diff --git a/__tests__/aws.test.ts b/__tests__/aws.test.ts index a965378..4a6a583 100644 --- a/__tests__/aws.test.ts +++ b/__tests__/aws.test.ts @@ -1,5 +1,5 @@ +import {AuthorizationData} from '@aws-sdk/client-ecr'; import * as aws from '../src/aws'; -import {AuthorizationData} from 'aws-sdk/clients/ecr'; describe('isECR', () => { test.each([ @@ -55,11 +55,15 @@ describe('getAccountIDs', () => { const mockEcrGetAuthToken = jest.fn(); const mockEcrPublicGetAuthToken = jest.fn(); -jest.mock('aws-sdk', () => { +jest.mock('@aws-sdk/client-ecr', () => { return { ECR: jest.fn(() => ({ getAuthorizationToken: mockEcrGetAuthToken - })), + })) + }; +}); +jest.mock('@aws-sdk/client-ecr-public', () => { + return { ECRPUBLIC: jest.fn(() => ({ getAuthorizationToken: mockEcrPublicGetAuthToken })) @@ -126,15 +130,11 @@ describe('getRegistriesData', () => { const authData: AuthorizationData[] = []; if (accountIDs.length == 0) { mockEcrPublicGetAuthToken.mockImplementation(() => { - return { - promise() { - return Promise.resolve({ - authorizationData: { - authorizationToken: Buffer.from(`AWS:world`).toString('base64'), - } - }); + return Promise.resolve({ + authorizationData: { + authorizationToken: Buffer.from(`AWS:world`).toString('base64'), } - }; + }); }); } else { aws.getAccountIDs(registry).forEach(accountID => { @@ -144,13 +144,9 @@ describe('getRegistriesData', () => { }); }); mockEcrGetAuthToken.mockImplementation(() => { - return { - promise() { - return Promise.resolve({ - authorizationData: authData - }); - } - }; + return Promise.resolve({ + authorizationData: authData + }); }); } const regData = await aws.getRegistriesData(registry); diff --git a/dist/index.js b/dist/index.js index 43067e5..0096e52 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,7 +1,39 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 35981: +/***/ 6748: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"name":"@aws-sdk/client-ecr-public","description":"AWS SDK for JavaScript Ecr Public Client for Node.js, Browser and React Native","version":"3.43.0","scripts":{"build":"yarn build:cjs && yarn build:es && yarn build:types","build:cjs":"tsc -p tsconfig.json","build:docs":"yarn clean:docs && typedoc ./","build:es":"tsc -p tsconfig.es.json","build:types":"tsc -p tsconfig.types.json","clean":"yarn clean:dist && yarn clean:docs","clean:dist":"rimraf ./dist","clean:docs":"rimraf ./docs","downlevel-dts":"downlevel-dts dist-types dist-types/ts3.4","test":"jest --coverage --passWithNoTests"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"2.0.0","@aws-crypto/sha256-js":"2.0.0","@aws-sdk/client-sts":"3.43.0","@aws-sdk/config-resolver":"3.40.0","@aws-sdk/credential-provider-node":"3.41.0","@aws-sdk/fetch-http-handler":"3.40.0","@aws-sdk/hash-node":"3.40.0","@aws-sdk/invalid-dependency":"3.40.0","@aws-sdk/middleware-content-length":"3.40.0","@aws-sdk/middleware-host-header":"3.40.0","@aws-sdk/middleware-logger":"3.40.0","@aws-sdk/middleware-retry":"3.40.0","@aws-sdk/middleware-serde":"3.40.0","@aws-sdk/middleware-signing":"3.40.0","@aws-sdk/middleware-stack":"3.40.0","@aws-sdk/middleware-user-agent":"3.40.0","@aws-sdk/node-config-provider":"3.40.0","@aws-sdk/node-http-handler":"3.40.0","@aws-sdk/protocol-http":"3.40.0","@aws-sdk/smithy-client":"3.41.0","@aws-sdk/types":"3.40.0","@aws-sdk/url-parser":"3.40.0","@aws-sdk/util-base64-browser":"3.37.0","@aws-sdk/util-base64-node":"3.37.0","@aws-sdk/util-body-length-browser":"3.37.0","@aws-sdk/util-body-length-node":"3.37.0","@aws-sdk/util-user-agent-browser":"3.40.0","@aws-sdk/util-user-agent-node":"3.40.0","@aws-sdk/util-utf8-browser":"3.37.0","@aws-sdk/util-utf8-node":"3.37.0","tslib":"^2.3.0"},"devDependencies":{"@aws-sdk/service-client-documentation-generator":"3.38.0","@types/node":"^12.7.5","downlevel-dts":"0.7.0","jest":"^26.1.0","rimraf":"^3.0.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"~4.3.5"},"engines":{"node":">=10.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-ecr-public","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-ecr-public"}}'); + +/***/ }), + +/***/ 6879: +/***/ ((module) => { + +"use strict"; +module.exports = JSON.parse('{"name":"@aws-sdk/client-ecr","description":"AWS SDK for JavaScript Ecr Client for Node.js, Browser and React Native","version":"3.44.0","scripts":{"build":"yarn build:cjs && yarn build:es && yarn build:types","build:cjs":"tsc -p tsconfig.json","build:docs":"yarn clean:docs && typedoc ./","build:es":"tsc -p tsconfig.es.json","build:types":"tsc -p tsconfig.types.json","clean":"yarn clean:dist && yarn clean:docs","clean:dist":"rimraf ./dist","clean:docs":"rimraf ./docs","downlevel-dts":"downlevel-dts dist-types dist-types/ts3.4","test":"exit 0"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"2.0.0","@aws-crypto/sha256-js":"2.0.0","@aws-sdk/client-sts":"3.43.0","@aws-sdk/config-resolver":"3.40.0","@aws-sdk/credential-provider-node":"3.41.0","@aws-sdk/fetch-http-handler":"3.40.0","@aws-sdk/hash-node":"3.40.0","@aws-sdk/invalid-dependency":"3.40.0","@aws-sdk/middleware-content-length":"3.40.0","@aws-sdk/middleware-host-header":"3.40.0","@aws-sdk/middleware-logger":"3.40.0","@aws-sdk/middleware-retry":"3.40.0","@aws-sdk/middleware-serde":"3.40.0","@aws-sdk/middleware-signing":"3.40.0","@aws-sdk/middleware-stack":"3.40.0","@aws-sdk/middleware-user-agent":"3.40.0","@aws-sdk/node-config-provider":"3.40.0","@aws-sdk/node-http-handler":"3.40.0","@aws-sdk/protocol-http":"3.40.0","@aws-sdk/smithy-client":"3.41.0","@aws-sdk/types":"3.40.0","@aws-sdk/url-parser":"3.40.0","@aws-sdk/util-base64-browser":"3.37.0","@aws-sdk/util-base64-node":"3.37.0","@aws-sdk/util-body-length-browser":"3.37.0","@aws-sdk/util-body-length-node":"3.37.0","@aws-sdk/util-user-agent-browser":"3.40.0","@aws-sdk/util-user-agent-node":"3.40.0","@aws-sdk/util-utf8-browser":"3.37.0","@aws-sdk/util-utf8-node":"3.37.0","@aws-sdk/util-waiter":"3.40.0","tslib":"^2.3.0"},"devDependencies":{"@aws-sdk/service-client-documentation-generator":"3.38.0","@types/node":"^12.7.5","downlevel-dts":"0.7.0","jest":"^26.1.0","rimraf":"^3.0.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"~4.3.5"},"engines":{"node":">=10.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-ecr","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-ecr"}}'); + +/***/ }), + +/***/ 3966: +/***/ ((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.41.0","scripts":{"build":"yarn build:cjs && yarn build:es && yarn build:types","build:cjs":"tsc -p tsconfig.json","build:docs":"yarn clean:docs && typedoc ./","build:es":"tsc -p tsconfig.es.json","build:types":"tsc -p tsconfig.types.json","clean":"yarn clean:dist && yarn clean:docs","clean:dist":"rimraf ./dist","clean:docs":"rimraf ./docs","downlevel-dts":"downlevel-dts dist-types dist-types/ts3.4","test":"exit 0"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"2.0.0","@aws-crypto/sha256-js":"2.0.0","@aws-sdk/config-resolver":"3.40.0","@aws-sdk/fetch-http-handler":"3.40.0","@aws-sdk/hash-node":"3.40.0","@aws-sdk/invalid-dependency":"3.40.0","@aws-sdk/middleware-content-length":"3.40.0","@aws-sdk/middleware-host-header":"3.40.0","@aws-sdk/middleware-logger":"3.40.0","@aws-sdk/middleware-retry":"3.40.0","@aws-sdk/middleware-serde":"3.40.0","@aws-sdk/middleware-stack":"3.40.0","@aws-sdk/middleware-user-agent":"3.40.0","@aws-sdk/node-config-provider":"3.40.0","@aws-sdk/node-http-handler":"3.40.0","@aws-sdk/protocol-http":"3.40.0","@aws-sdk/smithy-client":"3.41.0","@aws-sdk/types":"3.40.0","@aws-sdk/url-parser":"3.40.0","@aws-sdk/util-base64-browser":"3.37.0","@aws-sdk/util-base64-node":"3.37.0","@aws-sdk/util-body-length-browser":"3.37.0","@aws-sdk/util-body-length-node":"3.37.0","@aws-sdk/util-user-agent-browser":"3.40.0","@aws-sdk/util-user-agent-node":"3.40.0","@aws-sdk/util-utf8-browser":"3.37.0","@aws-sdk/util-utf8-node":"3.37.0","tslib":"^2.3.0"},"devDependencies":{"@aws-sdk/service-client-documentation-generator":"3.38.0","@types/node":"^12.7.5","downlevel-dts":"0.7.0","jest":"^26.1.0","rimraf":"^3.0.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"~4.3.5"},"engines":{"node":">=10.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"}}'); + +/***/ }), + +/***/ 1121: +/***/ ((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.43.0","scripts":{"build":"yarn build:cjs && yarn build:es && yarn build:types","build:cjs":"tsc -p tsconfig.json","build:docs":"yarn clean:docs && typedoc ./","build:es":"tsc -p tsconfig.es.json","build:types":"tsc -p tsconfig.types.json","clean":"yarn clean:dist && yarn clean:docs","clean:dist":"rimraf ./dist","clean:docs":"rimraf ./docs","downlevel-dts":"downlevel-dts dist-types dist-types/ts3.4","test":"exit 0"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"2.0.0","@aws-crypto/sha256-js":"2.0.0","@aws-sdk/config-resolver":"3.40.0","@aws-sdk/credential-provider-node":"3.41.0","@aws-sdk/fetch-http-handler":"3.40.0","@aws-sdk/hash-node":"3.40.0","@aws-sdk/invalid-dependency":"3.40.0","@aws-sdk/middleware-content-length":"3.40.0","@aws-sdk/middleware-host-header":"3.40.0","@aws-sdk/middleware-logger":"3.40.0","@aws-sdk/middleware-retry":"3.40.0","@aws-sdk/middleware-sdk-sts":"3.40.0","@aws-sdk/middleware-serde":"3.40.0","@aws-sdk/middleware-signing":"3.40.0","@aws-sdk/middleware-stack":"3.40.0","@aws-sdk/middleware-user-agent":"3.40.0","@aws-sdk/node-config-provider":"3.40.0","@aws-sdk/node-http-handler":"3.40.0","@aws-sdk/protocol-http":"3.40.0","@aws-sdk/smithy-client":"3.41.0","@aws-sdk/types":"3.40.0","@aws-sdk/url-parser":"3.40.0","@aws-sdk/util-base64-browser":"3.37.0","@aws-sdk/util-base64-node":"3.37.0","@aws-sdk/util-body-length-browser":"3.37.0","@aws-sdk/util-body-length-node":"3.37.0","@aws-sdk/util-user-agent-browser":"3.40.0","@aws-sdk/util-user-agent-node":"3.40.0","@aws-sdk/util-utf8-browser":"3.37.0","@aws-sdk/util-utf8-node":"3.37.0","entities":"2.2.0","fast-xml-parser":"3.19.0","tslib":"^2.3.0"},"devDependencies":{"@aws-sdk/service-client-documentation-generator":"3.38.0","@types/node":"^12.7.5","downlevel-dts":"0.7.0","jest":"^26.1.0","rimraf":"^3.0.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"~4.3.5"},"engines":{"node":">=10.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-sts","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sts"}}'); + +/***/ }), + +/***/ 5981: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -36,8 +68,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getRegistriesData = exports.getAccountIDs = exports.getRegion = exports.isPubECR = exports.isECR = void 0; -const core = __importStar(__nccwpck_require__(42186)); -const aws = __importStar(__nccwpck_require__(71786)); +const core = __importStar(__nccwpck_require__(2186)); +const client_ecr_1 = __nccwpck_require__(8923); +const client_ecr_public_1 = __nccwpck_require__(2308); const ecrRegistryRegex = /^(([0-9]{12})\.dkr\.ecr\.(.+)\.amazonaws\.com(.cn)?)(\/([^:]+)(:.+)?)?$/; exports.isECR = (registry) => { return ecrRegistryRegex.test(registry) || exports.isPubECR(registry); @@ -77,15 +110,20 @@ exports.getRegistriesData = (registry, username, password) => __awaiter(void 0, core.debug(`Requesting AWS ECR auth token for ${accountIDs.join(', ')}`); authTokenRequest['registryIds'] = accountIDs; } + const credentials = username && password + ? { + accessKeyId: username, + secretAccessKey: password + } + : undefined; if (exports.isPubECR(registry)) { core.info(`AWS Public ECR detected with ${region} region`); - const ecrPublic = new aws.ECRPUBLIC({ + const ecrPublic = new client_ecr_public_1.ECRPUBLIC({ customUserAgent: 'docker-login-action', - accessKeyId: username || process.env.AWS_ACCESS_KEY_ID || '', - secretAccessKey: password || process.env.AWS_SECRET_ACCESS_KEY || '', + credentials, region: region }); - const authTokenResponse = yield ecrPublic.getAuthorizationToken(authTokenRequest).promise(); + const authTokenResponse = yield ecrPublic.getAuthorizationToken(authTokenRequest); if (!authTokenResponse.authorizationData || !authTokenResponse.authorizationData.authorizationToken) { throw new Error('Could not retrieve an authorization token from AWS Public ECR'); } @@ -101,13 +139,12 @@ exports.getRegistriesData = (registry, username, password) => __awaiter(void 0, } else { core.info(`AWS ECR detected with ${region} region`); - const ecr = new aws.ECR({ + const ecr = new client_ecr_1.ECR({ customUserAgent: 'docker-login-action', - accessKeyId: username || process.env.AWS_ACCESS_KEY_ID || '', - secretAccessKey: password || process.env.AWS_SECRET_ACCESS_KEY || '', + credentials, region: region }); - const authTokenResponse = yield ecr.getAuthorizationToken(authTokenRequest).promise(); + const authTokenResponse = yield ecr.getAuthorizationToken(authTokenRequest); if (!Array.isArray(authTokenResponse.authorizationData) || !authTokenResponse.authorizationData.length) { throw new Error('Could not retrieve an authorization token from AWS ECR'); } @@ -128,7 +165,7 @@ exports.getRegistriesData = (registry, username, password) => __awaiter(void 0, /***/ }), -/***/ 13842: +/***/ 3842: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -154,7 +191,7 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getInputs = void 0; -const core = __importStar(__nccwpck_require__(42186)); +const core = __importStar(__nccwpck_require__(2186)); function getInputs() { return { registry: core.getInput('registry'), @@ -204,9 +241,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.loginECR = exports.loginStandard = exports.logout = exports.login = void 0; -const aws = __importStar(__nccwpck_require__(35981)); -const core = __importStar(__nccwpck_require__(42186)); -const exec = __importStar(__nccwpck_require__(71514)); +const aws = __importStar(__nccwpck_require__(5981)); +const core = __importStar(__nccwpck_require__(2186)); +const exec = __importStar(__nccwpck_require__(1514)); function login(registry, username, password, ecr) { return __awaiter(this, void 0, void 0, function* () { if (/true/i.test(ecr) || (ecr == 'auto' && aws.isECR(registry))) { @@ -322,10 +359,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.run = void 0; -const core = __importStar(__nccwpck_require__(42186)); -const context = __importStar(__nccwpck_require__(13842)); +const core = __importStar(__nccwpck_require__(2186)); +const context = __importStar(__nccwpck_require__(3842)); const docker = __importStar(__nccwpck_require__(3758)); -const stateHelper = __importStar(__nccwpck_require__(88647)); +const stateHelper = __importStar(__nccwpck_require__(8647)); function run() { return __awaiter(this, void 0, void 0, function* () { try { @@ -358,7 +395,7 @@ else { /***/ }), -/***/ 88647: +/***/ 8647: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -384,7 +421,7 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.setLogout = exports.setRegistry = exports.logout = exports.registry = exports.IsPost = void 0; -const core = __importStar(__nccwpck_require__(42186)); +const core = __importStar(__nccwpck_require__(2186)); exports.IsPost = !!process.env['STATE_isPost']; exports.registry = process.env['STATE_registry'] || ''; exports.logout = /true/i.test(process.env['STATE_logout'] || ''); @@ -403,7 +440,7 @@ if (!exports.IsPost) { /***/ }), -/***/ 87351: +/***/ 7351: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -429,7 +466,7 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.issue = exports.issueCommand = void 0; -const os = __importStar(__nccwpck_require__(12087)); +const os = __importStar(__nccwpck_require__(2087)); const utils_1 = __nccwpck_require__(5278); /** * Commands @@ -502,7 +539,7 @@ function escapeProperty(s) { /***/ }), -/***/ 42186: +/***/ 2186: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -537,12 +574,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.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; -const command_1 = __nccwpck_require__(87351); +const command_1 = __nccwpck_require__(7351); const file_command_1 = __nccwpck_require__(717); const utils_1 = __nccwpck_require__(5278); -const os = __importStar(__nccwpck_require__(12087)); -const path = __importStar(__nccwpck_require__(85622)); -const oidc_utils_1 = __nccwpck_require__(98041); +const os = __importStar(__nccwpck_require__(2087)); +const path = __importStar(__nccwpck_require__(5622)); +const oidc_utils_1 = __nccwpck_require__(8041); /** * The code to exit an action */ @@ -850,8 +887,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.issueCommand = void 0; // We use any as a valid input type /* eslint-disable @typescript-eslint/no-explicit-any */ -const fs = __importStar(__nccwpck_require__(35747)); -const os = __importStar(__nccwpck_require__(12087)); +const fs = __importStar(__nccwpck_require__(5747)); +const os = __importStar(__nccwpck_require__(2087)); const utils_1 = __nccwpck_require__(5278); function issueCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; @@ -870,7 +907,7 @@ exports.issueCommand = issueCommand; /***/ }), -/***/ 98041: +/***/ 8041: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -886,9 +923,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.OidcClient = void 0; -const http_client_1 = __nccwpck_require__(39925); -const auth_1 = __nccwpck_require__(23702); -const core_1 = __nccwpck_require__(42186); +const http_client_1 = __nccwpck_require__(9925); +const auth_1 = __nccwpck_require__(3702); +const core_1 = __nccwpck_require__(2186); class OidcClient { static createHttpClient(allowRetry = true, maxRetry = 10) { const requestOptions = { @@ -1001,7 +1038,7 @@ exports.toCommandProperties = toCommandProperties; /***/ }), -/***/ 71514: +/***/ 1514: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1036,8 +1073,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getExecOutput = exports.exec = void 0; -const string_decoder_1 = __nccwpck_require__(24304); -const tr = __importStar(__nccwpck_require__(88159)); +const string_decoder_1 = __nccwpck_require__(4304); +const tr = __importStar(__nccwpck_require__(8159)); /** * Exec a command. * Output will be streamed to the live console. @@ -1111,7 +1148,7 @@ exports.getExecOutput = getExecOutput; /***/ }), -/***/ 88159: +/***/ 8159: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1146,13 +1183,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.argStringToArray = exports.ToolRunner = void 0; -const os = __importStar(__nccwpck_require__(12087)); -const events = __importStar(__nccwpck_require__(28614)); -const child = __importStar(__nccwpck_require__(63129)); -const path = __importStar(__nccwpck_require__(85622)); -const io = __importStar(__nccwpck_require__(47351)); -const ioUtil = __importStar(__nccwpck_require__(81962)); -const timers_1 = __nccwpck_require__(78213); +const os = __importStar(__nccwpck_require__(2087)); +const events = __importStar(__nccwpck_require__(8614)); +const child = __importStar(__nccwpck_require__(3129)); +const path = __importStar(__nccwpck_require__(5622)); +const io = __importStar(__nccwpck_require__(7436)); +const ioUtil = __importStar(__nccwpck_require__(1962)); +const timers_1 = __nccwpck_require__(8213); /* eslint-disable @typescript-eslint/unbound-method */ const IS_WINDOWS = process.platform === 'win32'; /* @@ -1736,7 +1773,7 @@ class ExecState extends events.EventEmitter { /***/ }), -/***/ 23702: +/***/ 3702: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -1802,15 +1839,15 @@ exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHand /***/ }), -/***/ 39925: +/***/ 9925: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const http = __nccwpck_require__(98605); -const https = __nccwpck_require__(57211); -const pm = __nccwpck_require__(16443); +const http = __nccwpck_require__(8605); +const https = __nccwpck_require__(7211); +const pm = __nccwpck_require__(6443); let tunnel; var HttpCodes; (function (HttpCodes) { @@ -2229,7 +2266,7 @@ class HttpClient { if (useProxy) { // If using proxy, need tunnel if (!tunnel) { - tunnel = __nccwpck_require__(74294); + tunnel = __nccwpck_require__(4294); } const agentOptions = { maxSockets: maxSockets, @@ -2347,7 +2384,7 @@ exports.HttpClient = HttpClient; /***/ }), -/***/ 16443: +/***/ 6443: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -2412,7 +2449,7 @@ exports.checkBypass = checkBypass; /***/ }), -/***/ 81962: +/***/ 1962: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -2448,8 +2485,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge var _a; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rename = exports.readlink = exports.readdir = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; -const fs = __importStar(__nccwpck_require__(35747)); -const path = __importStar(__nccwpck_require__(85622)); +const fs = __importStar(__nccwpck_require__(5747)); +const path = __importStar(__nccwpck_require__(5622)); _a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; exports.IS_WINDOWS = process.platform === 'win32'; function exists(fsPath) { @@ -2596,7 +2633,7 @@ exports.getCmdPath = getCmdPath; /***/ }), -/***/ 47351: +/***/ 7436: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -2631,11 +2668,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; -const assert_1 = __nccwpck_require__(42357); -const childProcess = __importStar(__nccwpck_require__(63129)); -const path = __importStar(__nccwpck_require__(85622)); -const util_1 = __nccwpck_require__(31669); -const ioUtil = __importStar(__nccwpck_require__(81962)); +const assert_1 = __nccwpck_require__(2357); +const childProcess = __importStar(__nccwpck_require__(3129)); +const path = __importStar(__nccwpck_require__(5622)); +const util_1 = __nccwpck_require__(1669); +const ioUtil = __importStar(__nccwpck_require__(1962)); const exec = util_1.promisify(childProcess.exec); const execFile = util_1.promisify(childProcess.execFile); /** @@ -2944,28585 +2981,27319 @@ function copyFile(srcFile, destFile, force) { /***/ }), -/***/ 20940: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['accessanalyzer'] = {}; -AWS.AccessAnalyzer = Service.defineService('accessanalyzer', ['2019-11-01']); -Object.defineProperty(apiLoader.services['accessanalyzer'], '2019-11-01', { - get: function get() { - var model = __nccwpck_require__(24955); - model.paginators = __nccwpck_require__(7997)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.AccessAnalyzer; - - -/***/ }), - -/***/ 20234: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['account'] = {}; -AWS.Account = Service.defineService('account', ['2021-02-01']); -Object.defineProperty(apiLoader.services['account'], '2021-02-01', { - get: function get() { - var model = __nccwpck_require__(25870); - model.paginators = __nccwpck_require__(69544)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Account; - - -/***/ }), - -/***/ 30838: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['acm'] = {}; -AWS.ACM = Service.defineService('acm', ['2015-12-08']); -Object.defineProperty(apiLoader.services['acm'], '2015-12-08', { - get: function get() { - var model = __nccwpck_require__(22335); - model.paginators = __nccwpck_require__(63763)/* .pagination */ .o; - model.waiters = __nccwpck_require__(12336)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ACM; - - -/***/ }), - -/***/ 18450: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['acmpca'] = {}; -AWS.ACMPCA = Service.defineService('acmpca', ['2017-08-22']); -Object.defineProperty(apiLoader.services['acmpca'], '2017-08-22', { - get: function get() { - var model = __nccwpck_require__(2794); - model.paginators = __nccwpck_require__(92031)/* .pagination */ .o; - model.waiters = __nccwpck_require__(50728)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ACMPCA; - - -/***/ }), - -/***/ 14578: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['alexaforbusiness'] = {}; -AWS.AlexaForBusiness = Service.defineService('alexaforbusiness', ['2017-11-09']); -Object.defineProperty(apiLoader.services['alexaforbusiness'], '2017-11-09', { - get: function get() { - var model = __nccwpck_require__(4946); - model.paginators = __nccwpck_require__(74967)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.AlexaForBusiness; - - -/***/ }), - -/***/ 26296: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -module.exports = { - ACM: __nccwpck_require__(30838), - APIGateway: __nccwpck_require__(91759), - ApplicationAutoScaling: __nccwpck_require__(25598), - AppStream: __nccwpck_require__(21730), - AutoScaling: __nccwpck_require__(31652), - Batch: __nccwpck_require__(10000), - Budgets: __nccwpck_require__(43923), - CloudDirectory: __nccwpck_require__(56231), - CloudFormation: __nccwpck_require__(74643), - CloudFront: __nccwpck_require__(48058), - CloudHSM: __nccwpck_require__(10569), - CloudSearch: __nccwpck_require__(72321), - CloudSearchDomain: __nccwpck_require__(64072), - CloudTrail: __nccwpck_require__(65512), - CloudWatch: __nccwpck_require__(6763), - CloudWatchEvents: __nccwpck_require__(38124), - CloudWatchLogs: __nccwpck_require__(96693), - CodeBuild: __nccwpck_require__(60450), - CodeCommit: __nccwpck_require__(71323), - CodeDeploy: __nccwpck_require__(54599), - CodePipeline: __nccwpck_require__(22938), - CognitoIdentity: __nccwpck_require__(58291), - CognitoIdentityServiceProvider: __nccwpck_require__(31379), - CognitoSync: __nccwpck_require__(74770), - ConfigService: __nccwpck_require__(34061), - CUR: __nccwpck_require__(5026), - DataPipeline: __nccwpck_require__(65688), - DeviceFarm: __nccwpck_require__(26272), - DirectConnect: __nccwpck_require__(73783), - DirectoryService: __nccwpck_require__(83908), - Discovery: __nccwpck_require__(81690), - DMS: __nccwpck_require__(69868), - DynamoDB: __nccwpck_require__(14347), - DynamoDBStreams: __nccwpck_require__(88090), - EC2: __nccwpck_require__(7778), - ECR: __nccwpck_require__(15211), - ECS: __nccwpck_require__(16615), - EFS: __nccwpck_require__(34375), - ElastiCache: __nccwpck_require__(81065), - ElasticBeanstalk: __nccwpck_require__(14897), - ELB: __nccwpck_require__(10907), - ELBv2: __nccwpck_require__(44311), - EMR: __nccwpck_require__(50470), - ES: __nccwpck_require__(84462), - ElasticTranscoder: __nccwpck_require__(40745), - Firehose: __nccwpck_require__(92831), - GameLift: __nccwpck_require__(8085), - Glacier: __nccwpck_require__(63249), - Health: __nccwpck_require__(21834), - IAM: __nccwpck_require__(50058), - ImportExport: __nccwpck_require__(6769), - Inspector: __nccwpck_require__(89439), - Iot: __nccwpck_require__(98392), - IotData: __nccwpck_require__(6564), - Kinesis: __nccwpck_require__(49876), - KinesisAnalytics: __nccwpck_require__(90042), - KMS: __nccwpck_require__(56782), - Lambda: __nccwpck_require__(13321), - LexRuntime: __nccwpck_require__(62716), - Lightsail: __nccwpck_require__(22718), - MachineLearning: __nccwpck_require__(82907), - MarketplaceCommerceAnalytics: __nccwpck_require__(4540), - MarketplaceMetering: __nccwpck_require__(39297), - MTurk: __nccwpck_require__(79954), - MobileAnalytics: __nccwpck_require__(66690), - OpsWorks: __nccwpck_require__(75691), - OpsWorksCM: __nccwpck_require__(80388), - Organizations: __nccwpck_require__(44670), - Pinpoint: __nccwpck_require__(18388), - Polly: __nccwpck_require__(97332), - RDS: __nccwpck_require__(71578), - Redshift: __nccwpck_require__(84853), - Rekognition: __nccwpck_require__(65470), - ResourceGroupsTaggingAPI: __nccwpck_require__(7385), - Route53: __nccwpck_require__(44968), - Route53Domains: __nccwpck_require__(51994), - S3: __nccwpck_require__(83256), - S3Control: __nccwpck_require__(99817), - ServiceCatalog: __nccwpck_require__(822), - SES: __nccwpck_require__(46816), - Shield: __nccwpck_require__(20271), - SimpleDB: __nccwpck_require__(10120), - SMS: __nccwpck_require__(57719), - Snowball: __nccwpck_require__(510), - SNS: __nccwpck_require__(28581), - SQS: __nccwpck_require__(63172), - SSM: __nccwpck_require__(83380), - StorageGateway: __nccwpck_require__(89190), - StepFunctions: __nccwpck_require__(8136), - STS: __nccwpck_require__(57513), - Support: __nccwpck_require__(1099), - SWF: __nccwpck_require__(32327), - XRay: __nccwpck_require__(41548), - WAF: __nccwpck_require__(72742), - WAFRegional: __nccwpck_require__(23153), - WorkDocs: __nccwpck_require__(38835), - WorkSpaces: __nccwpck_require__(25513), - CodeStar: __nccwpck_require__(98336), - LexModelBuildingService: __nccwpck_require__(37397), - MarketplaceEntitlementService: __nccwpck_require__(53707), - Athena: __nccwpck_require__(29434), - Greengrass: __nccwpck_require__(20690), - DAX: __nccwpck_require__(71398), - MigrationHub: __nccwpck_require__(14688), - CloudHSMV2: __nccwpck_require__(70889), - Glue: __nccwpck_require__(31658), - Mobile: __nccwpck_require__(39782), - Pricing: __nccwpck_require__(92765), - CostExplorer: __nccwpck_require__(79523), - MediaConvert: __nccwpck_require__(57220), - MediaLive: __nccwpck_require__(7509), - MediaPackage: __nccwpck_require__(91620), - MediaStore: __nccwpck_require__(83748), - MediaStoreData: __nccwpck_require__(98703), - AppSync: __nccwpck_require__(12402), - GuardDuty: __nccwpck_require__(40755), - MQ: __nccwpck_require__(23093), - Comprehend: __nccwpck_require__(62878), - IoTJobsDataPlane: __nccwpck_require__(42332), - KinesisVideoArchivedMedia: __nccwpck_require__(5580), - KinesisVideoMedia: __nccwpck_require__(81308), - KinesisVideo: __nccwpck_require__(89927), - SageMakerRuntime: __nccwpck_require__(85044), - SageMaker: __nccwpck_require__(77657), - Translate: __nccwpck_require__(72544), - ResourceGroups: __nccwpck_require__(58756), - AlexaForBusiness: __nccwpck_require__(14578), - Cloud9: __nccwpck_require__(85473), - ServerlessApplicationRepository: __nccwpck_require__(62402), - ServiceDiscovery: __nccwpck_require__(91569), - WorkMail: __nccwpck_require__(38374), - AutoScalingPlans: __nccwpck_require__(2554), - TranscribeService: __nccwpck_require__(75811), - Connect: __nccwpck_require__(13879), - ACMPCA: __nccwpck_require__(18450), - FMS: __nccwpck_require__(11316), - SecretsManager: __nccwpck_require__(85131), - IoTAnalytics: __nccwpck_require__(67409), - IoT1ClickDevicesService: __nccwpck_require__(39474), - IoT1ClickProjects: __nccwpck_require__(4686), - PI: __nccwpck_require__(15505), - Neptune: __nccwpck_require__(30047), - MediaTailor: __nccwpck_require__(99658), - EKS: __nccwpck_require__(23337), - Macie: __nccwpck_require__(86427), - DLM: __nccwpck_require__(24958), - Signer: __nccwpck_require__(71596), - Chime: __nccwpck_require__(84646), - PinpointEmail: __nccwpck_require__(83060), - RAM: __nccwpck_require__(94394), - Route53Resolver: __nccwpck_require__(25894), - PinpointSMSVoice: __nccwpck_require__(46605), - QuickSight: __nccwpck_require__(29898), - RDSDataService: __nccwpck_require__(30147), - Amplify: __nccwpck_require__(38090), - DataSync: __nccwpck_require__(15472), - RoboMaker: __nccwpck_require__(18068), - Transfer: __nccwpck_require__(51585), - GlobalAccelerator: __nccwpck_require__(19306), - ComprehendMedical: __nccwpck_require__(32349), - KinesisAnalyticsV2: __nccwpck_require__(74631), - MediaConnect: __nccwpck_require__(67639), - FSx: __nccwpck_require__(60642), - SecurityHub: __nccwpck_require__(21550), - AppMesh: __nccwpck_require__(69226), - LicenseManager: __nccwpck_require__(34693), - Kafka: __nccwpck_require__(56775), - ApiGatewayManagementApi: __nccwpck_require__(31762), - ApiGatewayV2: __nccwpck_require__(44987), - DocDB: __nccwpck_require__(55129), - Backup: __nccwpck_require__(82455), - WorkLink: __nccwpck_require__(48579), - Textract: __nccwpck_require__(58523), - ManagedBlockchain: __nccwpck_require__(85143), - MediaPackageVod: __nccwpck_require__(14962), - GroundStation: __nccwpck_require__(80494), - IoTThingsGraph: __nccwpck_require__(58905), - IoTEvents: __nccwpck_require__(88065), - IoTEventsData: __nccwpck_require__(56973), - Personalize: __nccwpck_require__(33696), - PersonalizeEvents: __nccwpck_require__(88170), - PersonalizeRuntime: __nccwpck_require__(66184), - ApplicationInsights: __nccwpck_require__(83972), - ServiceQuotas: __nccwpck_require__(57800), - EC2InstanceConnect: __nccwpck_require__(92209), - EventBridge: __nccwpck_require__(898), - LakeFormation: __nccwpck_require__(6726), - ForecastService: __nccwpck_require__(12942), - ForecastQueryService: __nccwpck_require__(36822), - QLDB: __nccwpck_require__(71266), - QLDBSession: __nccwpck_require__(55423), - WorkMailMessageFlow: __nccwpck_require__(67025), - CodeStarNotifications: __nccwpck_require__(15141), - SavingsPlans: __nccwpck_require__(62825), - SSO: __nccwpck_require__(71096), - SSOOIDC: __nccwpck_require__(49870), - MarketplaceCatalog: __nccwpck_require__(2609), - DataExchange: __nccwpck_require__(11024), - SESV2: __nccwpck_require__(20142), - MigrationHubConfig: __nccwpck_require__(62658), - ConnectParticipant: __nccwpck_require__(94198), - AppConfig: __nccwpck_require__(78606), - IoTSecureTunneling: __nccwpck_require__(98562), - WAFV2: __nccwpck_require__(50353), - ElasticInference: __nccwpck_require__(37708), - Imagebuilder: __nccwpck_require__(57511), - Schemas: __nccwpck_require__(55713), - AccessAnalyzer: __nccwpck_require__(20940), - CodeGuruReviewer: __nccwpck_require__(60070), - CodeGuruProfiler: __nccwpck_require__(65704), - ComputeOptimizer: __nccwpck_require__(64459), - FraudDetector: __nccwpck_require__(99830), - Kendra: __nccwpck_require__(66122), - NetworkManager: __nccwpck_require__(37610), - Outposts: __nccwpck_require__(27551), - AugmentedAIRuntime: __nccwpck_require__(33960), - EBS: __nccwpck_require__(62837), - KinesisVideoSignalingChannels: __nccwpck_require__(12710), - Detective: __nccwpck_require__(60674), - CodeStarconnections: __nccwpck_require__(78270), - Synthetics: __nccwpck_require__(25910), - IoTSiteWise: __nccwpck_require__(89690), - Macie2: __nccwpck_require__(57330), - CodeArtifact: __nccwpck_require__(91983), - Honeycode: __nccwpck_require__(38889), - IVS: __nccwpck_require__(67701), - Braket: __nccwpck_require__(35429), - IdentityStore: __nccwpck_require__(60222), - Appflow: __nccwpck_require__(60844), - RedshiftData: __nccwpck_require__(203), - SSOAdmin: __nccwpck_require__(66644), - TimestreamQuery: __nccwpck_require__(24529), - TimestreamWrite: __nccwpck_require__(1573), - S3Outposts: __nccwpck_require__(90493), - DataBrew: __nccwpck_require__(35846), - ServiceCatalogAppRegistry: __nccwpck_require__(79068), - NetworkFirewall: __nccwpck_require__(84626), - MWAA: __nccwpck_require__(32712), - AmplifyBackend: __nccwpck_require__(2806), - AppIntegrations: __nccwpck_require__(85479), - ConnectContactLens: __nccwpck_require__(41847), - DevOpsGuru: __nccwpck_require__(90673), - ECRPUBLIC: __nccwpck_require__(90244), - LookoutVision: __nccwpck_require__(65046), - SageMakerFeatureStoreRuntime: __nccwpck_require__(67644), - CustomerProfiles: __nccwpck_require__(28379), - AuditManager: __nccwpck_require__(20472), - EMRcontainers: __nccwpck_require__(49984), - HealthLake: __nccwpck_require__(64254), - SagemakerEdge: __nccwpck_require__(38966), - Amp: __nccwpck_require__(96881), - GreengrassV2: __nccwpck_require__(45126), - IotDeviceAdvisor: __nccwpck_require__(97569), - IoTFleetHub: __nccwpck_require__(42513), - IoTWireless: __nccwpck_require__(8226), - Location: __nccwpck_require__(44594), - WellArchitected: __nccwpck_require__(86263), - LexModelsV2: __nccwpck_require__(27254), - LexRuntimeV2: __nccwpck_require__(33855), - Fis: __nccwpck_require__(73003), - LookoutMetrics: __nccwpck_require__(78708), - Mgn: __nccwpck_require__(41339), - LookoutEquipment: __nccwpck_require__(21843), - Nimble: __nccwpck_require__(89428), - Finspace: __nccwpck_require__(3052), - Finspacedata: __nccwpck_require__(96869), - SSMContacts: __nccwpck_require__(12577), - SSMIncidents: __nccwpck_require__(20590), - ApplicationCostProfiler: __nccwpck_require__(20887), - AppRunner: __nccwpck_require__(75589), - Proton: __nccwpck_require__(9275), - Route53RecoveryCluster: __nccwpck_require__(35738), - Route53RecoveryControlConfig: __nccwpck_require__(16063), - Route53RecoveryReadiness: __nccwpck_require__(79106), - ChimeSDKIdentity: __nccwpck_require__(55975), - ChimeSDKMessaging: __nccwpck_require__(25255), - SnowDeviceManagement: __nccwpck_require__(64655), - MemoryDB: __nccwpck_require__(50782), - OpenSearch: __nccwpck_require__(60358), - KafkaConnect: __nccwpck_require__(61879), - VoiceID: __nccwpck_require__(28747), - Wisdom: __nccwpck_require__(85266), - Account: __nccwpck_require__(20234), - CloudControl: __nccwpck_require__(25630), - Grafana: __nccwpck_require__(51050), - Panorama: __nccwpck_require__(20368), - ChimeSDKMeetings: __nccwpck_require__(80788), - Resiliencehub: __nccwpck_require__(21173), - MigrationHubStrategy: __nccwpck_require__(96533), - AppConfigData: __nccwpck_require__(45282), - Drs: __nccwpck_require__(41116), - MigrationHubRefactorSpaces: __nccwpck_require__(2925), - Evidently: __nccwpck_require__(21440), - Inspector2: __nccwpck_require__(98650), - Rbin: __nccwpck_require__(70145), - RUM: __nccwpck_require__(53237), - BackupGateway: __nccwpck_require__(68277), - IoTTwinMaker: __nccwpck_require__(65010), - WorkSpacesWeb: __nccwpck_require__(94124), - AmplifyUIBuilder: __nccwpck_require__(89937) -}; - -/***/ }), - -/***/ 96881: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['amp'] = {}; -AWS.Amp = Service.defineService('amp', ['2020-08-01']); -Object.defineProperty(apiLoader.services['amp'], '2020-08-01', { - get: function get() { - var model = __nccwpck_require__(36184); - model.paginators = __nccwpck_require__(7850)/* .pagination */ .o; - model.waiters = __nccwpck_require__(49041)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Amp; - - -/***/ }), - -/***/ 38090: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['amplify'] = {}; -AWS.Amplify = Service.defineService('amplify', ['2017-07-25']); -Object.defineProperty(apiLoader.services['amplify'], '2017-07-25', { - get: function get() { - var model = __nccwpck_require__(59237); - model.paginators = __nccwpck_require__(89594)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Amplify; - - -/***/ }), - -/***/ 2806: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['amplifybackend'] = {}; -AWS.AmplifyBackend = Service.defineService('amplifybackend', ['2020-08-11']); -Object.defineProperty(apiLoader.services['amplifybackend'], '2020-08-11', { - get: function get() { - var model = __nccwpck_require__(70211); - model.paginators = __nccwpck_require__(72426)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.AmplifyBackend; - - -/***/ }), - -/***/ 89937: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['amplifyuibuilder'] = {}; -AWS.AmplifyUIBuilder = Service.defineService('amplifyuibuilder', ['2021-08-11']); -Object.defineProperty(apiLoader.services['amplifyuibuilder'], '2021-08-11', { - get: function get() { - var model = __nccwpck_require__(36902); - model.paginators = __nccwpck_require__(90795)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.AmplifyUIBuilder; - - -/***/ }), - -/***/ 91759: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['apigateway'] = {}; -AWS.APIGateway = Service.defineService('apigateway', ['2015-07-09']); -__nccwpck_require__(4338); -Object.defineProperty(apiLoader.services['apigateway'], '2015-07-09', { - get: function get() { - var model = __nccwpck_require__(33895); - model.paginators = __nccwpck_require__(61271)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.APIGateway; - - -/***/ }), - -/***/ 31762: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['apigatewaymanagementapi'] = {}; -AWS.ApiGatewayManagementApi = Service.defineService('apigatewaymanagementapi', ['2018-11-29']); -Object.defineProperty(apiLoader.services['apigatewaymanagementapi'], '2018-11-29', { - get: function get() { - var model = __nccwpck_require__(31775); - model.paginators = __nccwpck_require__(19890)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ApiGatewayManagementApi; - - -/***/ }), - -/***/ 44987: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['apigatewayv2'] = {}; -AWS.ApiGatewayV2 = Service.defineService('apigatewayv2', ['2018-11-29']); -Object.defineProperty(apiLoader.services['apigatewayv2'], '2018-11-29', { - get: function get() { - var model = __nccwpck_require__(18767); - model.paginators = __nccwpck_require__(96828)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ApiGatewayV2; - - -/***/ }), - -/***/ 78606: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['appconfig'] = {}; -AWS.AppConfig = Service.defineService('appconfig', ['2019-10-09']); -Object.defineProperty(apiLoader.services['appconfig'], '2019-10-09', { - get: function get() { - var model = __nccwpck_require__(5832); - model.paginators = __nccwpck_require__(38388)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.AppConfig; - - -/***/ }), - -/***/ 45282: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['appconfigdata'] = {}; -AWS.AppConfigData = Service.defineService('appconfigdata', ['2021-11-11']); -Object.defineProperty(apiLoader.services['appconfigdata'], '2021-11-11', { - get: function get() { - var model = __nccwpck_require__(32619); - model.paginators = __nccwpck_require__(44762)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.AppConfigData; - - -/***/ }), - -/***/ 60844: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['appflow'] = {}; -AWS.Appflow = Service.defineService('appflow', ['2020-08-23']); -Object.defineProperty(apiLoader.services['appflow'], '2020-08-23', { - get: function get() { - var model = __nccwpck_require__(63769); - model.paginators = __nccwpck_require__(3505)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Appflow; - - -/***/ }), - -/***/ 85479: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['appintegrations'] = {}; -AWS.AppIntegrations = Service.defineService('appintegrations', ['2020-07-29']); -Object.defineProperty(apiLoader.services['appintegrations'], '2020-07-29', { - get: function get() { - var model = __nccwpck_require__(26469); - model.paginators = __nccwpck_require__(74824)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.AppIntegrations; - - -/***/ }), - -/***/ 25598: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['applicationautoscaling'] = {}; -AWS.ApplicationAutoScaling = Service.defineService('applicationautoscaling', ['2016-02-06']); -Object.defineProperty(apiLoader.services['applicationautoscaling'], '2016-02-06', { - get: function get() { - var model = __nccwpck_require__(14452); - model.paginators = __nccwpck_require__(11157)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ApplicationAutoScaling; - - -/***/ }), - -/***/ 20887: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['applicationcostprofiler'] = {}; -AWS.ApplicationCostProfiler = Service.defineService('applicationcostprofiler', ['2020-09-10']); -Object.defineProperty(apiLoader.services['applicationcostprofiler'], '2020-09-10', { - get: function get() { - var model = __nccwpck_require__(87634); - model.paginators = __nccwpck_require__(47987)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ApplicationCostProfiler; - - -/***/ }), - -/***/ 83972: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['applicationinsights'] = {}; -AWS.ApplicationInsights = Service.defineService('applicationinsights', ['2018-11-25']); -Object.defineProperty(apiLoader.services['applicationinsights'], '2018-11-25', { - get: function get() { - var model = __nccwpck_require__(48728); - model.paginators = __nccwpck_require__(9986)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ApplicationInsights; - - -/***/ }), - -/***/ 69226: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['appmesh'] = {}; -AWS.AppMesh = Service.defineService('appmesh', ['2018-10-01', '2018-10-01*', '2019-01-25']); -Object.defineProperty(apiLoader.services['appmesh'], '2018-10-01', { - get: function get() { - var model = __nccwpck_require__(4710); - model.paginators = __nccwpck_require__(74196)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); -Object.defineProperty(apiLoader.services['appmesh'], '2019-01-25', { - get: function get() { - var model = __nccwpck_require__(99818); - model.paginators = __nccwpck_require__(9865)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.AppMesh; - - -/***/ }), - -/***/ 75589: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['apprunner'] = {}; -AWS.AppRunner = Service.defineService('apprunner', ['2020-05-15']); -Object.defineProperty(apiLoader.services['apprunner'], '2020-05-15', { - get: function get() { - var model = __nccwpck_require__(74076); - model.paginators = __nccwpck_require__(81788)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.AppRunner; - - -/***/ }), - -/***/ 21730: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['appstream'] = {}; -AWS.AppStream = Service.defineService('appstream', ['2016-12-01']); -Object.defineProperty(apiLoader.services['appstream'], '2016-12-01', { - get: function get() { - var model = __nccwpck_require__(12513); - model.paginators = __nccwpck_require__(81915)/* .pagination */ .o; - model.waiters = __nccwpck_require__(98407)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.AppStream; - - -/***/ }), - -/***/ 12402: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['appsync'] = {}; -AWS.AppSync = Service.defineService('appsync', ['2017-07-25']); -Object.defineProperty(apiLoader.services['appsync'], '2017-07-25', { - get: function get() { - var model = __nccwpck_require__(3651); - model.paginators = __nccwpck_require__(93930)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.AppSync; - - -/***/ }), - -/***/ 29434: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['athena'] = {}; -AWS.Athena = Service.defineService('athena', ['2017-05-18']); -Object.defineProperty(apiLoader.services['athena'], '2017-05-18', { - get: function get() { - var model = __nccwpck_require__(19898); - model.paginators = __nccwpck_require__(23135)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Athena; - - -/***/ }), - -/***/ 20472: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['auditmanager'] = {}; -AWS.AuditManager = Service.defineService('auditmanager', ['2017-07-25']); -Object.defineProperty(apiLoader.services['auditmanager'], '2017-07-25', { - get: function get() { - var model = __nccwpck_require__(66702); - model.paginators = __nccwpck_require__(99387)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.AuditManager; - - -/***/ }), - -/***/ 33960: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['augmentedairuntime'] = {}; -AWS.AugmentedAIRuntime = Service.defineService('augmentedairuntime', ['2019-11-07']); -Object.defineProperty(apiLoader.services['augmentedairuntime'], '2019-11-07', { - get: function get() { - var model = __nccwpck_require__(60302); - model.paginators = __nccwpck_require__(58181)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.AugmentedAIRuntime; - - -/***/ }), - -/***/ 31652: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['autoscaling'] = {}; -AWS.AutoScaling = Service.defineService('autoscaling', ['2011-01-01']); -Object.defineProperty(apiLoader.services['autoscaling'], '2011-01-01', { - get: function get() { - var model = __nccwpck_require__(68489); - model.paginators = __nccwpck_require__(38676)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.AutoScaling; - - -/***/ }), - -/***/ 2554: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['autoscalingplans'] = {}; -AWS.AutoScalingPlans = Service.defineService('autoscalingplans', ['2018-01-06']); -Object.defineProperty(apiLoader.services['autoscalingplans'], '2018-01-06', { - get: function get() { - var model = __nccwpck_require__(95300); - model.paginators = __nccwpck_require__(4511)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.AutoScalingPlans; - - -/***/ }), - -/***/ 82455: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['backup'] = {}; -AWS.Backup = Service.defineService('backup', ['2018-11-15']); -Object.defineProperty(apiLoader.services['backup'], '2018-11-15', { - get: function get() { - var model = __nccwpck_require__(65918); - model.paginators = __nccwpck_require__(61080)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Backup; - - -/***/ }), - -/***/ 68277: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['backupgateway'] = {}; -AWS.BackupGateway = Service.defineService('backupgateway', ['2021-01-01']); -Object.defineProperty(apiLoader.services['backupgateway'], '2021-01-01', { - get: function get() { - var model = __nccwpck_require__(50816); - model.paginators = __nccwpck_require__(42274)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.BackupGateway; - - -/***/ }), - -/***/ 10000: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['batch'] = {}; -AWS.Batch = Service.defineService('batch', ['2016-08-10']); -Object.defineProperty(apiLoader.services['batch'], '2016-08-10', { - get: function get() { - var model = __nccwpck_require__(97171); - model.paginators = __nccwpck_require__(27755)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Batch; - - -/***/ }), - -/***/ 35429: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['braket'] = {}; -AWS.Braket = Service.defineService('braket', ['2019-09-01']); -Object.defineProperty(apiLoader.services['braket'], '2019-09-01', { - get: function get() { - var model = __nccwpck_require__(44714); - model.paginators = __nccwpck_require__(60058)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Braket; - - -/***/ }), - -/***/ 43923: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['budgets'] = {}; -AWS.Budgets = Service.defineService('budgets', ['2016-10-20']); -Object.defineProperty(apiLoader.services['budgets'], '2016-10-20', { - get: function get() { - var model = __nccwpck_require__(47942); - model.paginators = __nccwpck_require__(64219)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Budgets; - - -/***/ }), - -/***/ 84646: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['chime'] = {}; -AWS.Chime = Service.defineService('chime', ['2018-05-01']); -Object.defineProperty(apiLoader.services['chime'], '2018-05-01', { - get: function get() { - var model = __nccwpck_require__(55823); - model.paginators = __nccwpck_require__(6307)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Chime; - - -/***/ }), - -/***/ 55975: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['chimesdkidentity'] = {}; -AWS.ChimeSDKIdentity = Service.defineService('chimesdkidentity', ['2021-04-20']); -Object.defineProperty(apiLoader.services['chimesdkidentity'], '2021-04-20', { - get: function get() { - var model = __nccwpck_require__(62052); - model.paginators = __nccwpck_require__(77523)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ChimeSDKIdentity; - - -/***/ }), - -/***/ 80788: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['chimesdkmeetings'] = {}; -AWS.ChimeSDKMeetings = Service.defineService('chimesdkmeetings', ['2021-07-15']); -Object.defineProperty(apiLoader.services['chimesdkmeetings'], '2021-07-15', { - get: function get() { - var model = __nccwpck_require__(15081); - model.paginators = __nccwpck_require__(29537)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ChimeSDKMeetings; - - -/***/ }), - -/***/ 25255: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['chimesdkmessaging'] = {}; -AWS.ChimeSDKMessaging = Service.defineService('chimesdkmessaging', ['2021-05-15']); -Object.defineProperty(apiLoader.services['chimesdkmessaging'], '2021-05-15', { - get: function get() { - var model = __nccwpck_require__(4378); - model.paginators = __nccwpck_require__(8921)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ChimeSDKMessaging; - - -/***/ }), - -/***/ 85473: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['cloud9'] = {}; -AWS.Cloud9 = Service.defineService('cloud9', ['2017-09-23']); -Object.defineProperty(apiLoader.services['cloud9'], '2017-09-23', { - get: function get() { - var model = __nccwpck_require__(90697); - model.paginators = __nccwpck_require__(79426)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Cloud9; - - -/***/ }), - -/***/ 25630: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['cloudcontrol'] = {}; -AWS.CloudControl = Service.defineService('cloudcontrol', ['2021-09-30']); -Object.defineProperty(apiLoader.services['cloudcontrol'], '2021-09-30', { - get: function get() { - var model = __nccwpck_require__(56373); - model.paginators = __nccwpck_require__(86078)/* .pagination */ .o; - model.waiters = __nccwpck_require__(50992)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CloudControl; - - -/***/ }), - -/***/ 56231: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['clouddirectory'] = {}; -AWS.CloudDirectory = Service.defineService('clouddirectory', ['2016-05-10', '2016-05-10*', '2017-01-11']); -Object.defineProperty(apiLoader.services['clouddirectory'], '2016-05-10', { - get: function get() { - var model = __nccwpck_require__(87301); - model.paginators = __nccwpck_require__(72446)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); -Object.defineProperty(apiLoader.services['clouddirectory'], '2017-01-11', { - get: function get() { - var model = __nccwpck_require__(79943); - model.paginators = __nccwpck_require__(20410)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CloudDirectory; - - -/***/ }), - -/***/ 74643: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['cloudformation'] = {}; -AWS.CloudFormation = Service.defineService('cloudformation', ['2010-05-15']); -Object.defineProperty(apiLoader.services['cloudformation'], '2010-05-15', { - get: function get() { - var model = __nccwpck_require__(50980); - model.paginators = __nccwpck_require__(43078)/* .pagination */ .o; - model.waiters = __nccwpck_require__(11714)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CloudFormation; - - -/***/ }), - -/***/ 48058: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['cloudfront'] = {}; -AWS.CloudFront = Service.defineService('cloudfront', ['2013-05-12*', '2013-11-11*', '2014-05-31*', '2014-10-21*', '2014-11-06*', '2015-04-17*', '2015-07-27*', '2015-09-17*', '2016-01-13*', '2016-01-28*', '2016-08-01*', '2016-08-20*', '2016-09-07*', '2016-09-29*', '2016-11-25', '2016-11-25*', '2017-03-25', '2017-03-25*', '2017-10-30', '2017-10-30*', '2018-06-18', '2018-06-18*', '2018-11-05', '2018-11-05*', '2019-03-26', '2019-03-26*', '2020-05-31']); -__nccwpck_require__(95483); -Object.defineProperty(apiLoader.services['cloudfront'], '2016-11-25', { - get: function get() { - var model = __nccwpck_require__(81977); - model.paginators = __nccwpck_require__(12819)/* .pagination */ .o; - model.waiters = __nccwpck_require__(52832)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); -Object.defineProperty(apiLoader.services['cloudfront'], '2017-03-25', { - get: function get() { - var model = __nccwpck_require__(38288); - model.paginators = __nccwpck_require__(19896)/* .pagination */ .o; - model.waiters = __nccwpck_require__(43589)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); -Object.defineProperty(apiLoader.services['cloudfront'], '2017-10-30', { - get: function get() { - var model = __nccwpck_require__(62352); - model.paginators = __nccwpck_require__(94430)/* .pagination */ .o; - model.waiters = __nccwpck_require__(36502)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); -Object.defineProperty(apiLoader.services['cloudfront'], '2018-06-18', { - get: function get() { - var model = __nccwpck_require__(59976); - model.paginators = __nccwpck_require__(43510)/* .pagination */ .o; - model.waiters = __nccwpck_require__(67512)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); -Object.defineProperty(apiLoader.services['cloudfront'], '2018-11-05', { - get: function get() { - var model = __nccwpck_require__(2861); - model.paginators = __nccwpck_require__(94484)/* .pagination */ .o; - model.waiters = __nccwpck_require__(94992)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); -Object.defineProperty(apiLoader.services['cloudfront'], '2019-03-26', { - get: function get() { - var model = __nccwpck_require__(22621); - model.paginators = __nccwpck_require__(49289)/* .pagination */ .o; - model.waiters = __nccwpck_require__(89078)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); -Object.defineProperty(apiLoader.services['cloudfront'], '2020-05-31', { - get: function get() { - var model = __nccwpck_require__(44946); - model.paginators = __nccwpck_require__(92022)/* .pagination */ .o; - model.waiters = __nccwpck_require__(83035)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CloudFront; - - -/***/ }), - -/***/ 10569: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['cloudhsm'] = {}; -AWS.CloudHSM = Service.defineService('cloudhsm', ['2014-05-30']); -Object.defineProperty(apiLoader.services['cloudhsm'], '2014-05-30', { - get: function get() { - var model = __nccwpck_require__(59717); - model.paginators = __nccwpck_require__(26512)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CloudHSM; - - -/***/ }), - -/***/ 70889: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['cloudhsmv2'] = {}; -AWS.CloudHSMV2 = Service.defineService('cloudhsmv2', ['2017-04-28']); -Object.defineProperty(apiLoader.services['cloudhsmv2'], '2017-04-28', { - get: function get() { - var model = __nccwpck_require__(19362); - model.paginators = __nccwpck_require__(96674)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CloudHSMV2; - - -/***/ }), - -/***/ 72321: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['cloudsearch'] = {}; -AWS.CloudSearch = Service.defineService('cloudsearch', ['2011-02-01', '2013-01-01']); -Object.defineProperty(apiLoader.services['cloudsearch'], '2011-02-01', { - get: function get() { - var model = __nccwpck_require__(4999); - model.paginators = __nccwpck_require__(74483)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); -Object.defineProperty(apiLoader.services['cloudsearch'], '2013-01-01', { - get: function get() { - var model = __nccwpck_require__(93200); - model.paginators = __nccwpck_require__(82352)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CloudSearch; - - -/***/ }), - -/***/ 64072: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['cloudsearchdomain'] = {}; -AWS.CloudSearchDomain = Service.defineService('cloudsearchdomain', ['2013-01-01']); -__nccwpck_require__(48571); -Object.defineProperty(apiLoader.services['cloudsearchdomain'], '2013-01-01', { - get: function get() { - var model = __nccwpck_require__(56588); - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CloudSearchDomain; - - -/***/ }), - -/***/ 65512: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['cloudtrail'] = {}; -AWS.CloudTrail = Service.defineService('cloudtrail', ['2013-11-01']); -Object.defineProperty(apiLoader.services['cloudtrail'], '2013-11-01', { - get: function get() { - var model = __nccwpck_require__(90967); - model.paginators = __nccwpck_require__(78414)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CloudTrail; - - -/***/ }), - -/***/ 6763: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['cloudwatch'] = {}; -AWS.CloudWatch = Service.defineService('cloudwatch', ['2010-08-01']); -Object.defineProperty(apiLoader.services['cloudwatch'], '2010-08-01', { - get: function get() { - var model = __nccwpck_require__(12505); - model.paginators = __nccwpck_require__(16758)/* .pagination */ .o; - model.waiters = __nccwpck_require__(4112)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CloudWatch; - - -/***/ }), - -/***/ 38124: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['cloudwatchevents'] = {}; -AWS.CloudWatchEvents = Service.defineService('cloudwatchevents', ['2014-02-03*', '2015-10-07']); -Object.defineProperty(apiLoader.services['cloudwatchevents'], '2015-10-07', { - get: function get() { - var model = __nccwpck_require__(2845); - model.paginators = __nccwpck_require__(96939)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CloudWatchEvents; - - -/***/ }), - -/***/ 96693: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['cloudwatchlogs'] = {}; -AWS.CloudWatchLogs = Service.defineService('cloudwatchlogs', ['2014-03-28']); -Object.defineProperty(apiLoader.services['cloudwatchlogs'], '2014-03-28', { - get: function get() { - var model = __nccwpck_require__(69022); - model.paginators = __nccwpck_require__(26273)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CloudWatchLogs; - - -/***/ }), - -/***/ 91983: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['codeartifact'] = {}; -AWS.CodeArtifact = Service.defineService('codeartifact', ['2018-09-22']); -Object.defineProperty(apiLoader.services['codeartifact'], '2018-09-22', { - get: function get() { - var model = __nccwpck_require__(26175); - model.paginators = __nccwpck_require__(21307)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CodeArtifact; - - -/***/ }), - -/***/ 60450: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['codebuild'] = {}; -AWS.CodeBuild = Service.defineService('codebuild', ['2016-10-06']); -Object.defineProperty(apiLoader.services['codebuild'], '2016-10-06', { - get: function get() { - var model = __nccwpck_require__(32310); - model.paginators = __nccwpck_require__(10589)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CodeBuild; - - -/***/ }), - -/***/ 71323: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['codecommit'] = {}; -AWS.CodeCommit = Service.defineService('codecommit', ['2015-04-13']); -Object.defineProperty(apiLoader.services['codecommit'], '2015-04-13', { - get: function get() { - var model = __nccwpck_require__(2091); - model.paginators = __nccwpck_require__(11742)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CodeCommit; - - -/***/ }), - -/***/ 54599: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['codedeploy'] = {}; -AWS.CodeDeploy = Service.defineService('codedeploy', ['2014-10-06']); -Object.defineProperty(apiLoader.services['codedeploy'], '2014-10-06', { - get: function get() { - var model = __nccwpck_require__(33531); - model.paginators = __nccwpck_require__(63203)/* .pagination */ .o; - model.waiters = __nccwpck_require__(56338)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CodeDeploy; - - -/***/ }), - -/***/ 65704: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['codeguruprofiler'] = {}; -AWS.CodeGuruProfiler = Service.defineService('codeguruprofiler', ['2019-07-18']); -Object.defineProperty(apiLoader.services['codeguruprofiler'], '2019-07-18', { - get: function get() { - var model = __nccwpck_require__(55790); - model.paginators = __nccwpck_require__(14789)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CodeGuruProfiler; - - -/***/ }), - -/***/ 60070: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['codegurureviewer'] = {}; -AWS.CodeGuruReviewer = Service.defineService('codegurureviewer', ['2019-09-19']); -Object.defineProperty(apiLoader.services['codegurureviewer'], '2019-09-19', { - get: function get() { - var model = __nccwpck_require__(16420); - model.paginators = __nccwpck_require__(89571)/* .pagination */ .o; - model.waiters = __nccwpck_require__(12860)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CodeGuruReviewer; - - -/***/ }), - -/***/ 22938: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['codepipeline'] = {}; -AWS.CodePipeline = Service.defineService('codepipeline', ['2015-07-09']); -Object.defineProperty(apiLoader.services['codepipeline'], '2015-07-09', { - get: function get() { - var model = __nccwpck_require__(92486); - model.paginators = __nccwpck_require__(38160)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CodePipeline; - - -/***/ }), - -/***/ 98336: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['codestar'] = {}; -AWS.CodeStar = Service.defineService('codestar', ['2017-04-19']); -Object.defineProperty(apiLoader.services['codestar'], '2017-04-19', { - get: function get() { - var model = __nccwpck_require__(71626); - model.paginators = __nccwpck_require__(78653)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CodeStar; - - -/***/ }), - -/***/ 78270: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['codestarconnections'] = {}; -AWS.CodeStarconnections = Service.defineService('codestarconnections', ['2019-12-01']); -Object.defineProperty(apiLoader.services['codestarconnections'], '2019-12-01', { - get: function get() { - var model = __nccwpck_require__(81568); - model.paginators = __nccwpck_require__(7656)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CodeStarconnections; - - -/***/ }), - -/***/ 15141: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['codestarnotifications'] = {}; -AWS.CodeStarNotifications = Service.defineService('codestarnotifications', ['2019-10-15']); -Object.defineProperty(apiLoader.services['codestarnotifications'], '2019-10-15', { - get: function get() { - var model = __nccwpck_require__(41964); - model.paginators = __nccwpck_require__(5741)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CodeStarNotifications; - - -/***/ }), - -/***/ 58291: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['cognitoidentity'] = {}; -AWS.CognitoIdentity = Service.defineService('cognitoidentity', ['2014-06-30']); -Object.defineProperty(apiLoader.services['cognitoidentity'], '2014-06-30', { - get: function get() { - var model = __nccwpck_require__(26102); - model.paginators = __nccwpck_require__(80796)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CognitoIdentity; - - -/***/ }), - -/***/ 31379: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['cognitoidentityserviceprovider'] = {}; -AWS.CognitoIdentityServiceProvider = Service.defineService('cognitoidentityserviceprovider', ['2016-04-18']); -Object.defineProperty(apiLoader.services['cognitoidentityserviceprovider'], '2016-04-18', { - get: function get() { - var model = __nccwpck_require__(60923); - model.paginators = __nccwpck_require__(32568)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CognitoIdentityServiceProvider; - - -/***/ }), - -/***/ 74770: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['cognitosync'] = {}; -AWS.CognitoSync = Service.defineService('cognitosync', ['2014-06-30']); -Object.defineProperty(apiLoader.services['cognitosync'], '2014-06-30', { - get: function get() { - var model = __nccwpck_require__(91406); - model.paginators = __nccwpck_require__(23418)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CognitoSync; - - -/***/ }), - -/***/ 62878: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['comprehend'] = {}; -AWS.Comprehend = Service.defineService('comprehend', ['2017-11-27']); -Object.defineProperty(apiLoader.services['comprehend'], '2017-11-27', { - get: function get() { - var model = __nccwpck_require__(71004); - model.paginators = __nccwpck_require__(70341)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Comprehend; - - -/***/ }), - -/***/ 32349: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['comprehendmedical'] = {}; -AWS.ComprehendMedical = Service.defineService('comprehendmedical', ['2018-10-30']); -Object.defineProperty(apiLoader.services['comprehendmedical'], '2018-10-30', { - get: function get() { - var model = __nccwpck_require__(65085); - model.paginators = __nccwpck_require__(89772)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ComprehendMedical; - - -/***/ }), - -/***/ 64459: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['computeoptimizer'] = {}; -AWS.ComputeOptimizer = Service.defineService('computeoptimizer', ['2019-11-01']); -Object.defineProperty(apiLoader.services['computeoptimizer'], '2019-11-01', { - get: function get() { - var model = __nccwpck_require__(559); - model.paginators = __nccwpck_require__(16060)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ComputeOptimizer; - - -/***/ }), - -/***/ 34061: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['configservice'] = {}; -AWS.ConfigService = Service.defineService('configservice', ['2014-11-12']); -Object.defineProperty(apiLoader.services['configservice'], '2014-11-12', { - get: function get() { - var model = __nccwpck_require__(85031); - model.paginators = __nccwpck_require__(55050)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ConfigService; - - -/***/ }), - -/***/ 13879: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['connect'] = {}; -AWS.Connect = Service.defineService('connect', ['2017-08-08']); -Object.defineProperty(apiLoader.services['connect'], '2017-08-08', { - get: function get() { - var model = __nccwpck_require__(13649); - model.paginators = __nccwpck_require__(35649)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Connect; - - -/***/ }), - -/***/ 41847: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['connectcontactlens'] = {}; -AWS.ConnectContactLens = Service.defineService('connectcontactlens', ['2020-08-21']); -Object.defineProperty(apiLoader.services['connectcontactlens'], '2020-08-21', { - get: function get() { - var model = __nccwpck_require__(86739); - model.paginators = __nccwpck_require__(49692)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ConnectContactLens; - - -/***/ }), - -/***/ 94198: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['connectparticipant'] = {}; -AWS.ConnectParticipant = Service.defineService('connectparticipant', ['2018-09-07']); -Object.defineProperty(apiLoader.services['connectparticipant'], '2018-09-07', { - get: function get() { - var model = __nccwpck_require__(46788); - model.paginators = __nccwpck_require__(2813)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ConnectParticipant; - - -/***/ }), - -/***/ 79523: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['costexplorer'] = {}; -AWS.CostExplorer = Service.defineService('costexplorer', ['2017-10-25']); -Object.defineProperty(apiLoader.services['costexplorer'], '2017-10-25', { - get: function get() { - var model = __nccwpck_require__(86565); - model.paginators = __nccwpck_require__(94382)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CostExplorer; - - -/***/ }), - -/***/ 5026: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['cur'] = {}; -AWS.CUR = Service.defineService('cur', ['2017-01-06']); -Object.defineProperty(apiLoader.services['cur'], '2017-01-06', { - get: function get() { - var model = __nccwpck_require__(4138); - model.paginators = __nccwpck_require__(29271)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CUR; - - -/***/ }), - -/***/ 28379: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['customerprofiles'] = {}; -AWS.CustomerProfiles = Service.defineService('customerprofiles', ['2020-08-15']); -Object.defineProperty(apiLoader.services['customerprofiles'], '2020-08-15', { - get: function get() { - var model = __nccwpck_require__(39734); - model.paginators = __nccwpck_require__(35003)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.CustomerProfiles; - - -/***/ }), - -/***/ 35846: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['databrew'] = {}; -AWS.DataBrew = Service.defineService('databrew', ['2017-07-25']); -Object.defineProperty(apiLoader.services['databrew'], '2017-07-25', { - get: function get() { - var model = __nccwpck_require__(42529); - model.paginators = __nccwpck_require__(91224)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.DataBrew; - - -/***/ }), - -/***/ 11024: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['dataexchange'] = {}; -AWS.DataExchange = Service.defineService('dataexchange', ['2017-07-25']); -Object.defineProperty(apiLoader.services['dataexchange'], '2017-07-25', { - get: function get() { - var model = __nccwpck_require__(25676); - model.paginators = __nccwpck_require__(44399)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.DataExchange; - - -/***/ }), - -/***/ 65688: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['datapipeline'] = {}; -AWS.DataPipeline = Service.defineService('datapipeline', ['2012-10-29']); -Object.defineProperty(apiLoader.services['datapipeline'], '2012-10-29', { - get: function get() { - var model = __nccwpck_require__(9547); - model.paginators = __nccwpck_require__(48471)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.DataPipeline; - - -/***/ }), - -/***/ 15472: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['datasync'] = {}; -AWS.DataSync = Service.defineService('datasync', ['2018-11-09']); -Object.defineProperty(apiLoader.services['datasync'], '2018-11-09', { - get: function get() { - var model = __nccwpck_require__(37374); - model.paginators = __nccwpck_require__(18448)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.DataSync; - - -/***/ }), - -/***/ 71398: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['dax'] = {}; -AWS.DAX = Service.defineService('dax', ['2017-04-19']); -Object.defineProperty(apiLoader.services['dax'], '2017-04-19', { - get: function get() { - var model = __nccwpck_require__(97287); - model.paginators = __nccwpck_require__(15791)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.DAX; - - -/***/ }), - -/***/ 60674: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['detective'] = {}; -AWS.Detective = Service.defineService('detective', ['2018-10-26']); -Object.defineProperty(apiLoader.services['detective'], '2018-10-26', { - get: function get() { - var model = __nccwpck_require__(38107); - model.paginators = __nccwpck_require__(26554)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Detective; - - -/***/ }), - -/***/ 26272: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['devicefarm'] = {}; -AWS.DeviceFarm = Service.defineService('devicefarm', ['2015-06-23']); -Object.defineProperty(apiLoader.services['devicefarm'], '2015-06-23', { - get: function get() { - var model = __nccwpck_require__(87206); - model.paginators = __nccwpck_require__(85524)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.DeviceFarm; - - -/***/ }), - -/***/ 90673: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['devopsguru'] = {}; -AWS.DevOpsGuru = Service.defineService('devopsguru', ['2020-12-01']); -Object.defineProperty(apiLoader.services['devopsguru'], '2020-12-01', { - get: function get() { - var model = __nccwpck_require__(82176); - model.paginators = __nccwpck_require__(91556)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.DevOpsGuru; - - -/***/ }), - -/***/ 73783: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['directconnect'] = {}; -AWS.DirectConnect = Service.defineService('directconnect', ['2012-10-25']); -Object.defineProperty(apiLoader.services['directconnect'], '2012-10-25', { - get: function get() { - var model = __nccwpck_require__(49177); - model.paginators = __nccwpck_require__(57373)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.DirectConnect; - - -/***/ }), - -/***/ 83908: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['directoryservice'] = {}; -AWS.DirectoryService = Service.defineService('directoryservice', ['2015-04-16']); -Object.defineProperty(apiLoader.services['directoryservice'], '2015-04-16', { - get: function get() { - var model = __nccwpck_require__(3174); - model.paginators = __nccwpck_require__(1714)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.DirectoryService; - - -/***/ }), - -/***/ 81690: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['discovery'] = {}; -AWS.Discovery = Service.defineService('discovery', ['2015-11-01']); -Object.defineProperty(apiLoader.services['discovery'], '2015-11-01', { - get: function get() { - var model = __nccwpck_require__(32400); - model.paginators = __nccwpck_require__(54052)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Discovery; - - -/***/ }), - -/***/ 24958: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['dlm'] = {}; -AWS.DLM = Service.defineService('dlm', ['2018-01-12']); -Object.defineProperty(apiLoader.services['dlm'], '2018-01-12', { - get: function get() { - var model = __nccwpck_require__(19210); - model.paginators = __nccwpck_require__(69943)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.DLM; - - -/***/ }), - -/***/ 69868: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['dms'] = {}; -AWS.DMS = Service.defineService('dms', ['2016-01-01']); -Object.defineProperty(apiLoader.services['dms'], '2016-01-01', { - get: function get() { - var model = __nccwpck_require__(85765); - model.paginators = __nccwpck_require__(170)/* .pagination */ .o; - model.waiters = __nccwpck_require__(31491)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.DMS; - - -/***/ }), - -/***/ 55129: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['docdb'] = {}; -AWS.DocDB = Service.defineService('docdb', ['2014-10-31']); -__nccwpck_require__(59050); -Object.defineProperty(apiLoader.services['docdb'], '2014-10-31', { - get: function get() { - var model = __nccwpck_require__(78804); - model.paginators = __nccwpck_require__(97929)/* .pagination */ .o; - model.waiters = __nccwpck_require__(61159)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.DocDB; - - -/***/ }), - -/***/ 41116: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['drs'] = {}; -AWS.Drs = Service.defineService('drs', ['2020-02-26']); -Object.defineProperty(apiLoader.services['drs'], '2020-02-26', { - get: function get() { - var model = __nccwpck_require__(15526); - model.paginators = __nccwpck_require__(68795)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Drs; - - -/***/ }), - -/***/ 14347: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['dynamodb'] = {}; -AWS.DynamoDB = Service.defineService('dynamodb', ['2011-12-05', '2012-08-10']); -__nccwpck_require__(17101); -Object.defineProperty(apiLoader.services['dynamodb'], '2011-12-05', { - get: function get() { - var model = __nccwpck_require__(59225); - model.paginators = __nccwpck_require__(30867)/* .pagination */ .o; - model.waiters = __nccwpck_require__(15606)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); -Object.defineProperty(apiLoader.services['dynamodb'], '2012-08-10', { - get: function get() { - var model = __nccwpck_require__(10198); - model.paginators = __nccwpck_require__(79199)/* .pagination */ .o; - model.waiters = __nccwpck_require__(13814)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.DynamoDB; - - -/***/ }), - -/***/ 88090: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['dynamodbstreams'] = {}; -AWS.DynamoDBStreams = Service.defineService('dynamodbstreams', ['2012-08-10']); -Object.defineProperty(apiLoader.services['dynamodbstreams'], '2012-08-10', { - get: function get() { - var model = __nccwpck_require__(69705); - model.paginators = __nccwpck_require__(18467)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.DynamoDBStreams; - - -/***/ }), - -/***/ 62837: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['ebs'] = {}; -AWS.EBS = Service.defineService('ebs', ['2019-11-02']); -Object.defineProperty(apiLoader.services['ebs'], '2019-11-02', { - get: function get() { - var model = __nccwpck_require__(67263); - model.paginators = __nccwpck_require__(94934)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.EBS; - - -/***/ }), - -/***/ 7778: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['ec2'] = {}; -AWS.EC2 = Service.defineService('ec2', ['2013-06-15*', '2013-10-15*', '2014-02-01*', '2014-05-01*', '2014-06-15*', '2014-09-01*', '2014-10-01*', '2015-03-01*', '2015-04-15*', '2015-10-01*', '2016-04-01*', '2016-09-15*', '2016-11-15']); -__nccwpck_require__(92501); -Object.defineProperty(apiLoader.services['ec2'], '2016-11-15', { - get: function get() { - var model = __nccwpck_require__(8893); - model.paginators = __nccwpck_require__(32127)/* .pagination */ .o; - model.waiters = __nccwpck_require__(90157)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.EC2; - - -/***/ }), - -/***/ 92209: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['ec2instanceconnect'] = {}; -AWS.EC2InstanceConnect = Service.defineService('ec2instanceconnect', ['2018-04-02']); -Object.defineProperty(apiLoader.services['ec2instanceconnect'], '2018-04-02', { - get: function get() { - var model = __nccwpck_require__(14703); - model.paginators = __nccwpck_require__(73353)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.EC2InstanceConnect; - - -/***/ }), - -/***/ 15211: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['ecr'] = {}; -AWS.ECR = Service.defineService('ecr', ['2015-09-21']); -Object.defineProperty(apiLoader.services['ecr'], '2015-09-21', { - get: function get() { - var model = __nccwpck_require__(80948); - model.paginators = __nccwpck_require__(66855)/* .pagination */ .o; - model.waiters = __nccwpck_require__(69800)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ECR; - - -/***/ }), - -/***/ 90244: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['ecrpublic'] = {}; -AWS.ECRPUBLIC = Service.defineService('ecrpublic', ['2020-10-30']); -Object.defineProperty(apiLoader.services['ecrpublic'], '2020-10-30', { - get: function get() { - var model = __nccwpck_require__(82416); - model.paginators = __nccwpck_require__(41518)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ECRPUBLIC; - - -/***/ }), - -/***/ 16615: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['ecs'] = {}; -AWS.ECS = Service.defineService('ecs', ['2014-11-13']); -Object.defineProperty(apiLoader.services['ecs'], '2014-11-13', { - get: function get() { - var model = __nccwpck_require__(68155); - model.paginators = __nccwpck_require__(33629)/* .pagination */ .o; - model.waiters = __nccwpck_require__(54199)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ECS; - - -/***/ }), - -/***/ 34375: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['efs'] = {}; -AWS.EFS = Service.defineService('efs', ['2015-02-01']); -Object.defineProperty(apiLoader.services['efs'], '2015-02-01', { - get: function get() { - var model = __nccwpck_require__(54989); - model.paginators = __nccwpck_require__(73750)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.EFS; - - -/***/ }), - -/***/ 23337: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['eks'] = {}; -AWS.EKS = Service.defineService('eks', ['2017-11-01']); -Object.defineProperty(apiLoader.services['eks'], '2017-11-01', { - get: function get() { - var model = __nccwpck_require__(7766); - model.paginators = __nccwpck_require__(17233)/* .pagination */ .o; - model.waiters = __nccwpck_require__(11545)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.EKS; - - -/***/ }), - -/***/ 81065: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['elasticache'] = {}; -AWS.ElastiCache = Service.defineService('elasticache', ['2012-11-15*', '2014-03-24*', '2014-07-15*', '2014-09-30*', '2015-02-02']); -Object.defineProperty(apiLoader.services['elasticache'], '2015-02-02', { - get: function get() { - var model = __nccwpck_require__(78248); - model.paginators = __nccwpck_require__(47954)/* .pagination */ .o; - model.waiters = __nccwpck_require__(35402)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ElastiCache; - - -/***/ }), - -/***/ 14897: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['elasticbeanstalk'] = {}; -AWS.ElasticBeanstalk = Service.defineService('elasticbeanstalk', ['2010-12-01']); -Object.defineProperty(apiLoader.services['elasticbeanstalk'], '2010-12-01', { - get: function get() { - var model = __nccwpck_require__(26770); - model.paginators = __nccwpck_require__(14282)/* .pagination */ .o; - model.waiters = __nccwpck_require__(125)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ElasticBeanstalk; - - -/***/ }), - -/***/ 37708: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['elasticinference'] = {}; -AWS.ElasticInference = Service.defineService('elasticinference', ['2017-07-25']); -Object.defineProperty(apiLoader.services['elasticinference'], '2017-07-25', { - get: function get() { - var model = __nccwpck_require__(76263); - model.paginators = __nccwpck_require__(73815)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ElasticInference; - - -/***/ }), - -/***/ 40745: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['elastictranscoder'] = {}; -AWS.ElasticTranscoder = Service.defineService('elastictranscoder', ['2012-09-25']); -Object.defineProperty(apiLoader.services['elastictranscoder'], '2012-09-25', { - get: function get() { - var model = __nccwpck_require__(45610); - model.paginators = __nccwpck_require__(35370)/* .pagination */ .o; - model.waiters = __nccwpck_require__(13314)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ElasticTranscoder; - - -/***/ }), - -/***/ 10907: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['elb'] = {}; -AWS.ELB = Service.defineService('elb', ['2012-06-01']); -Object.defineProperty(apiLoader.services['elb'], '2012-06-01', { - get: function get() { - var model = __nccwpck_require__(16234); - model.paginators = __nccwpck_require__(87921)/* .pagination */ .o; - model.waiters = __nccwpck_require__(41073)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ELB; - - -/***/ }), - -/***/ 44311: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['elbv2'] = {}; -AWS.ELBv2 = Service.defineService('elbv2', ['2015-12-01']); -Object.defineProperty(apiLoader.services['elbv2'], '2015-12-01', { - get: function get() { - var model = __nccwpck_require__(95067); - model.paginators = __nccwpck_require__(49154)/* .pagination */ .o; - model.waiters = __nccwpck_require__(14244)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ELBv2; - - -/***/ }), - -/***/ 50470: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['emr'] = {}; -AWS.EMR = Service.defineService('emr', ['2009-03-31']); -Object.defineProperty(apiLoader.services['emr'], '2009-03-31', { - get: function get() { - var model = __nccwpck_require__(61812); - model.paginators = __nccwpck_require__(45852)/* .pagination */ .o; - model.waiters = __nccwpck_require__(70234)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.EMR; - - -/***/ }), - -/***/ 49984: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['emrcontainers'] = {}; -AWS.EMRcontainers = Service.defineService('emrcontainers', ['2020-10-01']); -Object.defineProperty(apiLoader.services['emrcontainers'], '2020-10-01', { - get: function get() { - var model = __nccwpck_require__(96210); - model.paginators = __nccwpck_require__(83173)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.EMRcontainers; - - -/***/ }), - -/***/ 84462: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['es'] = {}; -AWS.ES = Service.defineService('es', ['2015-01-01']); -Object.defineProperty(apiLoader.services['es'], '2015-01-01', { - get: function get() { - var model = __nccwpck_require__(69235); - model.paginators = __nccwpck_require__(5589)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ES; - - -/***/ }), - -/***/ 898: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['eventbridge'] = {}; -AWS.EventBridge = Service.defineService('eventbridge', ['2015-10-07']); -Object.defineProperty(apiLoader.services['eventbridge'], '2015-10-07', { - get: function get() { - var model = __nccwpck_require__(16181); - model.paginators = __nccwpck_require__(41745)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.EventBridge; - - -/***/ }), - -/***/ 21440: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['evidently'] = {}; -AWS.Evidently = Service.defineService('evidently', ['2021-02-01']); -Object.defineProperty(apiLoader.services['evidently'], '2021-02-01', { - get: function get() { - var model = __nccwpck_require__(28544); - model.paginators = __nccwpck_require__(54840)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Evidently; - - -/***/ }), - -/***/ 3052: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['finspace'] = {}; -AWS.Finspace = Service.defineService('finspace', ['2021-03-12']); -Object.defineProperty(apiLoader.services['finspace'], '2021-03-12', { - get: function get() { - var model = __nccwpck_require__(37103); - model.paginators = __nccwpck_require__(57240)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Finspace; - - -/***/ }), - -/***/ 96869: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['finspacedata'] = {}; -AWS.Finspacedata = Service.defineService('finspacedata', ['2020-07-13']); -Object.defineProperty(apiLoader.services['finspacedata'], '2020-07-13', { - get: function get() { - var model = __nccwpck_require__(76667); - model.paginators = __nccwpck_require__(92445)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Finspacedata; - - -/***/ }), - -/***/ 92831: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['firehose'] = {}; -AWS.Firehose = Service.defineService('firehose', ['2015-08-04']); -Object.defineProperty(apiLoader.services['firehose'], '2015-08-04', { - get: function get() { - var model = __nccwpck_require__(53370); - model.paginators = __nccwpck_require__(16459)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Firehose; - - -/***/ }), - -/***/ 73003: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['fis'] = {}; -AWS.Fis = Service.defineService('fis', ['2020-12-01']); -Object.defineProperty(apiLoader.services['fis'], '2020-12-01', { - get: function get() { - var model = __nccwpck_require__(75416); - model.paginators = __nccwpck_require__(703)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Fis; - - -/***/ }), - -/***/ 11316: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['fms'] = {}; -AWS.FMS = Service.defineService('fms', ['2018-01-01']); -Object.defineProperty(apiLoader.services['fms'], '2018-01-01', { - get: function get() { - var model = __nccwpck_require__(86359); - model.paginators = __nccwpck_require__(47569)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.FMS; - - -/***/ }), - -/***/ 36822: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['forecastqueryservice'] = {}; -AWS.ForecastQueryService = Service.defineService('forecastqueryservice', ['2018-06-26']); -Object.defineProperty(apiLoader.services['forecastqueryservice'], '2018-06-26', { - get: function get() { - var model = __nccwpck_require__(6430); - model.paginators = __nccwpck_require__(30372)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ForecastQueryService; - - -/***/ }), - -/***/ 12942: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['forecastservice'] = {}; -AWS.ForecastService = Service.defineService('forecastservice', ['2018-06-26']); -Object.defineProperty(apiLoader.services['forecastservice'], '2018-06-26', { - get: function get() { - var model = __nccwpck_require__(55586); - model.paginators = __nccwpck_require__(83052)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ForecastService; - - -/***/ }), - -/***/ 99830: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['frauddetector'] = {}; -AWS.FraudDetector = Service.defineService('frauddetector', ['2019-11-15']); -Object.defineProperty(apiLoader.services['frauddetector'], '2019-11-15', { - get: function get() { - var model = __nccwpck_require__(93807); - model.paginators = __nccwpck_require__(32681)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.FraudDetector; - - -/***/ }), - -/***/ 60642: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['fsx'] = {}; -AWS.FSx = Service.defineService('fsx', ['2018-03-01']); -Object.defineProperty(apiLoader.services['fsx'], '2018-03-01', { - get: function get() { - var model = __nccwpck_require__(85233); - model.paginators = __nccwpck_require__(8719)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.FSx; - - -/***/ }), - -/***/ 8085: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['gamelift'] = {}; -AWS.GameLift = Service.defineService('gamelift', ['2015-10-01']); -Object.defineProperty(apiLoader.services['gamelift'], '2015-10-01', { - get: function get() { - var model = __nccwpck_require__(71658); - model.paginators = __nccwpck_require__(32274)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.GameLift; - - -/***/ }), - -/***/ 63249: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['glacier'] = {}; -AWS.Glacier = Service.defineService('glacier', ['2012-06-01']); -__nccwpck_require__(14472); -Object.defineProperty(apiLoader.services['glacier'], '2012-06-01', { - get: function get() { - var model = __nccwpck_require__(47563); - model.paginators = __nccwpck_require__(77100)/* .pagination */ .o; - model.waiters = __nccwpck_require__(81219)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Glacier; - - -/***/ }), - -/***/ 19306: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['globalaccelerator'] = {}; -AWS.GlobalAccelerator = Service.defineService('globalaccelerator', ['2018-08-08']); -Object.defineProperty(apiLoader.services['globalaccelerator'], '2018-08-08', { - get: function get() { - var model = __nccwpck_require__(5157); - model.paginators = __nccwpck_require__(9696)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.GlobalAccelerator; - - -/***/ }), - -/***/ 31658: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['glue'] = {}; -AWS.Glue = Service.defineService('glue', ['2017-03-31']); -Object.defineProperty(apiLoader.services['glue'], '2017-03-31', { - get: function get() { - var model = __nccwpck_require__(91789); - model.paginators = __nccwpck_require__(14005)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Glue; - - -/***/ }), - -/***/ 51050: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['grafana'] = {}; -AWS.Grafana = Service.defineService('grafana', ['2020-08-18']); -Object.defineProperty(apiLoader.services['grafana'], '2020-08-18', { - get: function get() { - var model = __nccwpck_require__(1266); - model.paginators = __nccwpck_require__(72877)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Grafana; - - -/***/ }), - -/***/ 20690: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['greengrass'] = {}; -AWS.Greengrass = Service.defineService('greengrass', ['2017-06-07']); -Object.defineProperty(apiLoader.services['greengrass'], '2017-06-07', { - get: function get() { - var model = __nccwpck_require__(25031); - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Greengrass; - - -/***/ }), - -/***/ 45126: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['greengrassv2'] = {}; -AWS.GreengrassV2 = Service.defineService('greengrassv2', ['2020-11-30']); -Object.defineProperty(apiLoader.services['greengrassv2'], '2020-11-30', { - get: function get() { - var model = __nccwpck_require__(22710); - model.paginators = __nccwpck_require__(94180)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.GreengrassV2; - - -/***/ }), - -/***/ 80494: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['groundstation'] = {}; -AWS.GroundStation = Service.defineService('groundstation', ['2019-05-23']); -Object.defineProperty(apiLoader.services['groundstation'], '2019-05-23', { - get: function get() { - var model = __nccwpck_require__(78309); - model.paginators = __nccwpck_require__(76938)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.GroundStation; - - -/***/ }), - -/***/ 40755: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['guardduty'] = {}; -AWS.GuardDuty = Service.defineService('guardduty', ['2017-11-28']); -Object.defineProperty(apiLoader.services['guardduty'], '2017-11-28', { - get: function get() { - var model = __nccwpck_require__(89297); - model.paginators = __nccwpck_require__(69484)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.GuardDuty; - - -/***/ }), - -/***/ 21834: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['health'] = {}; -AWS.Health = Service.defineService('health', ['2016-08-04']); -Object.defineProperty(apiLoader.services['health'], '2016-08-04', { - get: function get() { - var model = __nccwpck_require__(48698); - model.paginators = __nccwpck_require__(87844)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Health; - - -/***/ }), - -/***/ 64254: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['healthlake'] = {}; -AWS.HealthLake = Service.defineService('healthlake', ['2017-07-01']); -Object.defineProperty(apiLoader.services['healthlake'], '2017-07-01', { - get: function get() { - var model = __nccwpck_require__(78700); - model.paginators = __nccwpck_require__(31590)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.HealthLake; - - -/***/ }), - -/***/ 38889: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['honeycode'] = {}; -AWS.Honeycode = Service.defineService('honeycode', ['2020-03-01']); -Object.defineProperty(apiLoader.services['honeycode'], '2020-03-01', { - get: function get() { - var model = __nccwpck_require__(77536); - model.paginators = __nccwpck_require__(83349)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Honeycode; - - -/***/ }), - -/***/ 50058: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['iam'] = {}; -AWS.IAM = Service.defineService('iam', ['2010-05-08']); -Object.defineProperty(apiLoader.services['iam'], '2010-05-08', { - get: function get() { - var model = __nccwpck_require__(46818); - model.paginators = __nccwpck_require__(49015)/* .pagination */ .o; - model.waiters = __nccwpck_require__(48986)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.IAM; - - -/***/ }), - -/***/ 60222: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['identitystore'] = {}; -AWS.IdentityStore = Service.defineService('identitystore', ['2020-06-15']); -Object.defineProperty(apiLoader.services['identitystore'], '2020-06-15', { - get: function get() { - var model = __nccwpck_require__(14536); - model.paginators = __nccwpck_require__(96554)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.IdentityStore; - - -/***/ }), - -/***/ 57511: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['imagebuilder'] = {}; -AWS.Imagebuilder = Service.defineService('imagebuilder', ['2019-12-02']); -Object.defineProperty(apiLoader.services['imagebuilder'], '2019-12-02', { - get: function get() { - var model = __nccwpck_require__(79595); - model.paginators = __nccwpck_require__(57060)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Imagebuilder; - - -/***/ }), - -/***/ 6769: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['importexport'] = {}; -AWS.ImportExport = Service.defineService('importexport', ['2010-06-01']); -Object.defineProperty(apiLoader.services['importexport'], '2010-06-01', { - get: function get() { - var model = __nccwpck_require__(85415); - model.paginators = __nccwpck_require__(60069)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ImportExport; - - -/***/ }), - -/***/ 89439: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['inspector'] = {}; -AWS.Inspector = Service.defineService('inspector', ['2015-08-18*', '2016-02-16']); -Object.defineProperty(apiLoader.services['inspector'], '2016-02-16', { - get: function get() { - var model = __nccwpck_require__(92652); - model.paginators = __nccwpck_require__(98432)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Inspector; - - -/***/ }), - -/***/ 98650: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['inspector2'] = {}; -AWS.Inspector2 = Service.defineService('inspector2', ['2020-06-08']); -Object.defineProperty(apiLoader.services['inspector2'], '2020-06-08', { - get: function get() { - var model = __nccwpck_require__(7545); - model.paginators = __nccwpck_require__(55254)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Inspector2; - - -/***/ }), - -/***/ 98392: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['iot'] = {}; -AWS.Iot = Service.defineService('iot', ['2015-05-28']); -Object.defineProperty(apiLoader.services['iot'], '2015-05-28', { - get: function get() { - var model = __nccwpck_require__(47091); - model.paginators = __nccwpck_require__(39946)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Iot; - - -/***/ }), - -/***/ 39474: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['iot1clickdevicesservice'] = {}; -AWS.IoT1ClickDevicesService = Service.defineService('iot1clickdevicesservice', ['2018-05-14']); -Object.defineProperty(apiLoader.services['iot1clickdevicesservice'], '2018-05-14', { - get: function get() { - var model = __nccwpck_require__(69668); - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.IoT1ClickDevicesService; - - -/***/ }), - -/***/ 4686: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['iot1clickprojects'] = {}; -AWS.IoT1ClickProjects = Service.defineService('iot1clickprojects', ['2018-05-14']); -Object.defineProperty(apiLoader.services['iot1clickprojects'], '2018-05-14', { - get: function get() { - var model = __nccwpck_require__(66389); - model.paginators = __nccwpck_require__(42078)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.IoT1ClickProjects; - - -/***/ }), - -/***/ 67409: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['iotanalytics'] = {}; -AWS.IoTAnalytics = Service.defineService('iotanalytics', ['2017-11-27']); -Object.defineProperty(apiLoader.services['iotanalytics'], '2017-11-27', { - get: function get() { - var model = __nccwpck_require__(87696); - model.paginators = __nccwpck_require__(58536)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.IoTAnalytics; - - -/***/ }), - -/***/ 6564: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['iotdata'] = {}; -AWS.IotData = Service.defineService('iotdata', ['2015-05-28']); -__nccwpck_require__(27062); -Object.defineProperty(apiLoader.services['iotdata'], '2015-05-28', { - get: function get() { - var model = __nccwpck_require__(94126); - model.paginators = __nccwpck_require__(6435)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.IotData; - - -/***/ }), - -/***/ 97569: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['iotdeviceadvisor'] = {}; -AWS.IotDeviceAdvisor = Service.defineService('iotdeviceadvisor', ['2020-09-18']); -Object.defineProperty(apiLoader.services['iotdeviceadvisor'], '2020-09-18', { - get: function get() { - var model = __nccwpck_require__(19317); - model.paginators = __nccwpck_require__(9465)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.IotDeviceAdvisor; - - -/***/ }), - -/***/ 88065: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['iotevents'] = {}; -AWS.IoTEvents = Service.defineService('iotevents', ['2018-07-27']); -Object.defineProperty(apiLoader.services['iotevents'], '2018-07-27', { - get: function get() { - var model = __nccwpck_require__(55666); - model.paginators = __nccwpck_require__(13523)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.IoTEvents; - - -/***/ }), - -/***/ 56973: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['ioteventsdata'] = {}; -AWS.IoTEventsData = Service.defineService('ioteventsdata', ['2018-10-23']); -Object.defineProperty(apiLoader.services['ioteventsdata'], '2018-10-23', { - get: function get() { - var model = __nccwpck_require__(14647); - model.paginators = __nccwpck_require__(12541)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.IoTEventsData; - - -/***/ }), - -/***/ 42513: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['iotfleethub'] = {}; -AWS.IoTFleetHub = Service.defineService('iotfleethub', ['2020-11-03']); -Object.defineProperty(apiLoader.services['iotfleethub'], '2020-11-03', { - get: function get() { - var model = __nccwpck_require__(53518); - model.paginators = __nccwpck_require__(90350)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.IoTFleetHub; - - -/***/ }), - -/***/ 42332: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['iotjobsdataplane'] = {}; -AWS.IoTJobsDataPlane = Service.defineService('iotjobsdataplane', ['2017-09-29']); -Object.defineProperty(apiLoader.services['iotjobsdataplane'], '2017-09-29', { - get: function get() { - var model = __nccwpck_require__(27052); - model.paginators = __nccwpck_require__(87653)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.IoTJobsDataPlane; - - -/***/ }), - -/***/ 98562: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['iotsecuretunneling'] = {}; -AWS.IoTSecureTunneling = Service.defineService('iotsecuretunneling', ['2018-10-05']); -Object.defineProperty(apiLoader.services['iotsecuretunneling'], '2018-10-05', { - get: function get() { - var model = __nccwpck_require__(47810); - model.paginators = __nccwpck_require__(16978)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.IoTSecureTunneling; - - -/***/ }), - -/***/ 89690: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['iotsitewise'] = {}; -AWS.IoTSiteWise = Service.defineService('iotsitewise', ['2019-12-02']); -Object.defineProperty(apiLoader.services['iotsitewise'], '2019-12-02', { - get: function get() { - var model = __nccwpck_require__(94166); - model.paginators = __nccwpck_require__(81755)/* .pagination */ .o; - model.waiters = __nccwpck_require__(4197)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.IoTSiteWise; - - -/***/ }), - -/***/ 58905: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['iotthingsgraph'] = {}; -AWS.IoTThingsGraph = Service.defineService('iotthingsgraph', ['2018-09-06']); -Object.defineProperty(apiLoader.services['iotthingsgraph'], '2018-09-06', { - get: function get() { - var model = __nccwpck_require__(6038); - model.paginators = __nccwpck_require__(91296)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.IoTThingsGraph; - - -/***/ }), - -/***/ 65010: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['iottwinmaker'] = {}; -AWS.IoTTwinMaker = Service.defineService('iottwinmaker', ['2021-11-29']); -Object.defineProperty(apiLoader.services['iottwinmaker'], '2021-11-29', { - get: function get() { - var model = __nccwpck_require__(46721); - model.paginators = __nccwpck_require__(18823)/* .pagination */ .o; - model.waiters = __nccwpck_require__(2950)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.IoTTwinMaker; - - -/***/ }), - -/***/ 8226: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['iotwireless'] = {}; -AWS.IoTWireless = Service.defineService('iotwireless', ['2020-11-22']); -Object.defineProperty(apiLoader.services['iotwireless'], '2020-11-22', { - get: function get() { - var model = __nccwpck_require__(44396); - model.paginators = __nccwpck_require__(31164)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.IoTWireless; - - -/***/ }), - -/***/ 67701: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['ivs'] = {}; -AWS.IVS = Service.defineService('ivs', ['2020-07-14']); -Object.defineProperty(apiLoader.services['ivs'], '2020-07-14', { - get: function get() { - var model = __nccwpck_require__(41816); - model.paginators = __nccwpck_require__(38184)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.IVS; - - -/***/ }), - -/***/ 56775: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['kafka'] = {}; -AWS.Kafka = Service.defineService('kafka', ['2018-11-14']); -Object.defineProperty(apiLoader.services['kafka'], '2018-11-14', { - get: function get() { - var model = __nccwpck_require__(52315); - model.paginators = __nccwpck_require__(71066)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Kafka; - - -/***/ }), - -/***/ 61879: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['kafkaconnect'] = {}; -AWS.KafkaConnect = Service.defineService('kafkaconnect', ['2021-09-14']); -Object.defineProperty(apiLoader.services['kafkaconnect'], '2021-09-14', { - get: function get() { - var model = __nccwpck_require__(37421); - model.paginators = __nccwpck_require__(67736)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.KafkaConnect; - - -/***/ }), - -/***/ 66122: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['kendra'] = {}; -AWS.Kendra = Service.defineService('kendra', ['2019-02-03']); -Object.defineProperty(apiLoader.services['kendra'], '2019-02-03', { - get: function get() { - var model = __nccwpck_require__(61785); - model.paginators = __nccwpck_require__(31633)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Kendra; - - -/***/ }), - -/***/ 49876: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['kinesis'] = {}; -AWS.Kinesis = Service.defineService('kinesis', ['2013-12-02']); -Object.defineProperty(apiLoader.services['kinesis'], '2013-12-02', { - get: function get() { - var model = __nccwpck_require__(74556); - model.paginators = __nccwpck_require__(38540)/* .pagination */ .o; - model.waiters = __nccwpck_require__(80745)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Kinesis; - - -/***/ }), - -/***/ 90042: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['kinesisanalytics'] = {}; -AWS.KinesisAnalytics = Service.defineService('kinesisanalytics', ['2015-08-14']); -Object.defineProperty(apiLoader.services['kinesisanalytics'], '2015-08-14', { - get: function get() { - var model = __nccwpck_require__(91105); - model.paginators = __nccwpck_require__(18363)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.KinesisAnalytics; - - -/***/ }), - -/***/ 74631: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['kinesisanalyticsv2'] = {}; -AWS.KinesisAnalyticsV2 = Service.defineService('kinesisanalyticsv2', ['2018-05-23']); -Object.defineProperty(apiLoader.services['kinesisanalyticsv2'], '2018-05-23', { - get: function get() { - var model = __nccwpck_require__(70128); - model.paginators = __nccwpck_require__(6842)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.KinesisAnalyticsV2; - - -/***/ }), - -/***/ 89927: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['kinesisvideo'] = {}; -AWS.KinesisVideo = Service.defineService('kinesisvideo', ['2017-09-30']); -Object.defineProperty(apiLoader.services['kinesisvideo'], '2017-09-30', { - get: function get() { - var model = __nccwpck_require__(28189); - model.paginators = __nccwpck_require__(15191)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.KinesisVideo; - - -/***/ }), - -/***/ 5580: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['kinesisvideoarchivedmedia'] = {}; -AWS.KinesisVideoArchivedMedia = Service.defineService('kinesisvideoarchivedmedia', ['2017-09-30']); -Object.defineProperty(apiLoader.services['kinesisvideoarchivedmedia'], '2017-09-30', { - get: function get() { - var model = __nccwpck_require__(64288); - model.paginators = __nccwpck_require__(78514)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.KinesisVideoArchivedMedia; - - -/***/ }), - -/***/ 81308: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['kinesisvideomedia'] = {}; -AWS.KinesisVideoMedia = Service.defineService('kinesisvideomedia', ['2017-09-30']); -Object.defineProperty(apiLoader.services['kinesisvideomedia'], '2017-09-30', { - get: function get() { - var model = __nccwpck_require__(97818); - model.paginators = __nccwpck_require__(16923)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.KinesisVideoMedia; - - -/***/ }), - -/***/ 12710: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['kinesisvideosignalingchannels'] = {}; -AWS.KinesisVideoSignalingChannels = Service.defineService('kinesisvideosignalingchannels', ['2019-12-04']); -Object.defineProperty(apiLoader.services['kinesisvideosignalingchannels'], '2019-12-04', { - get: function get() { - var model = __nccwpck_require__(58849); - model.paginators = __nccwpck_require__(10473)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.KinesisVideoSignalingChannels; - - -/***/ }), - -/***/ 56782: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['kms'] = {}; -AWS.KMS = Service.defineService('kms', ['2014-11-01']); -Object.defineProperty(apiLoader.services['kms'], '2014-11-01', { - get: function get() { - var model = __nccwpck_require__(60611); - model.paginators = __nccwpck_require__(97690)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.KMS; - - -/***/ }), - -/***/ 6726: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['lakeformation'] = {}; -AWS.LakeFormation = Service.defineService('lakeformation', ['2017-03-31']); -Object.defineProperty(apiLoader.services['lakeformation'], '2017-03-31', { - get: function get() { - var model = __nccwpck_require__(65408); - model.paginators = __nccwpck_require__(89923)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.LakeFormation; - - -/***/ }), - -/***/ 13321: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['lambda'] = {}; -AWS.Lambda = Service.defineService('lambda', ['2014-11-11', '2015-03-31']); -__nccwpck_require__(8452); -Object.defineProperty(apiLoader.services['lambda'], '2014-11-11', { - get: function get() { - var model = __nccwpck_require__(63935); - model.paginators = __nccwpck_require__(86208)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); -Object.defineProperty(apiLoader.services['lambda'], '2015-03-31', { - get: function get() { - var model = __nccwpck_require__(50409); - model.paginators = __nccwpck_require__(98920)/* .pagination */ .o; - model.waiters = __nccwpck_require__(37582)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Lambda; - - -/***/ }), - -/***/ 37397: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['lexmodelbuildingservice'] = {}; -AWS.LexModelBuildingService = Service.defineService('lexmodelbuildingservice', ['2017-04-19']); -Object.defineProperty(apiLoader.services['lexmodelbuildingservice'], '2017-04-19', { - get: function get() { - var model = __nccwpck_require__(57942); - model.paginators = __nccwpck_require__(34148)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.LexModelBuildingService; - - -/***/ }), - -/***/ 27254: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['lexmodelsv2'] = {}; -AWS.LexModelsV2 = Service.defineService('lexmodelsv2', ['2020-08-07']); -Object.defineProperty(apiLoader.services['lexmodelsv2'], '2020-08-07', { - get: function get() { - var model = __nccwpck_require__(28033); - model.paginators = __nccwpck_require__(20751)/* .pagination */ .o; - model.waiters = __nccwpck_require__(78897)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.LexModelsV2; - - -/***/ }), - -/***/ 62716: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['lexruntime'] = {}; -AWS.LexRuntime = Service.defineService('lexruntime', ['2016-11-28']); -Object.defineProperty(apiLoader.services['lexruntime'], '2016-11-28', { - get: function get() { - var model = __nccwpck_require__(28098); - model.paginators = __nccwpck_require__(17108)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.LexRuntime; - - -/***/ }), - -/***/ 33855: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['lexruntimev2'] = {}; -AWS.LexRuntimeV2 = Service.defineService('lexruntimev2', ['2020-08-07']); -Object.defineProperty(apiLoader.services['lexruntimev2'], '2020-08-07', { - get: function get() { - var model = __nccwpck_require__(72007); - model.paginators = __nccwpck_require__(88199)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.LexRuntimeV2; - - -/***/ }), - -/***/ 34693: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['licensemanager'] = {}; -AWS.LicenseManager = Service.defineService('licensemanager', ['2018-08-01']); -Object.defineProperty(apiLoader.services['licensemanager'], '2018-08-01', { - get: function get() { - var model = __nccwpck_require__(58445); - model.paginators = __nccwpck_require__(73736)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.LicenseManager; - - -/***/ }), - -/***/ 22718: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['lightsail'] = {}; -AWS.Lightsail = Service.defineService('lightsail', ['2016-11-28']); -Object.defineProperty(apiLoader.services['lightsail'], '2016-11-28', { - get: function get() { - var model = __nccwpck_require__(59034); - model.paginators = __nccwpck_require__(96768)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Lightsail; - - -/***/ }), - -/***/ 44594: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['location'] = {}; -AWS.Location = Service.defineService('location', ['2020-11-19']); -Object.defineProperty(apiLoader.services['location'], '2020-11-19', { - get: function get() { - var model = __nccwpck_require__(77371); - model.paginators = __nccwpck_require__(23890)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Location; - - -/***/ }), - -/***/ 21843: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['lookoutequipment'] = {}; -AWS.LookoutEquipment = Service.defineService('lookoutequipment', ['2020-12-15']); -Object.defineProperty(apiLoader.services['lookoutequipment'], '2020-12-15', { - get: function get() { - var model = __nccwpck_require__(31015); - model.paginators = __nccwpck_require__(93065)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.LookoutEquipment; - - -/***/ }), - -/***/ 78708: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['lookoutmetrics'] = {}; -AWS.LookoutMetrics = Service.defineService('lookoutmetrics', ['2017-07-25']); -Object.defineProperty(apiLoader.services['lookoutmetrics'], '2017-07-25', { - get: function get() { - var model = __nccwpck_require__(99604); - model.paginators = __nccwpck_require__(86272)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.LookoutMetrics; - - -/***/ }), - -/***/ 65046: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['lookoutvision'] = {}; -AWS.LookoutVision = Service.defineService('lookoutvision', ['2020-11-20']); -Object.defineProperty(apiLoader.services['lookoutvision'], '2020-11-20', { - get: function get() { - var model = __nccwpck_require__(43317); - model.paginators = __nccwpck_require__(34273)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.LookoutVision; - - -/***/ }), - -/***/ 82907: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['machinelearning'] = {}; -AWS.MachineLearning = Service.defineService('machinelearning', ['2014-12-12']); -__nccwpck_require__(19174); -Object.defineProperty(apiLoader.services['machinelearning'], '2014-12-12', { - get: function get() { - var model = __nccwpck_require__(41946); - model.paginators = __nccwpck_require__(11688)/* .pagination */ .o; - model.waiters = __nccwpck_require__(92349)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.MachineLearning; - - -/***/ }), - -/***/ 86427: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['macie'] = {}; -AWS.Macie = Service.defineService('macie', ['2017-12-19']); -Object.defineProperty(apiLoader.services['macie'], '2017-12-19', { - get: function get() { - var model = __nccwpck_require__(27101); - model.paginators = __nccwpck_require__(9057)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Macie; - - -/***/ }), - -/***/ 57330: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['macie2'] = {}; -AWS.Macie2 = Service.defineService('macie2', ['2020-01-01']); -Object.defineProperty(apiLoader.services['macie2'], '2020-01-01', { - get: function get() { - var model = __nccwpck_require__(27105); - model.paginators = __nccwpck_require__(93284)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Macie2; - - -/***/ }), - -/***/ 85143: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['managedblockchain'] = {}; -AWS.ManagedBlockchain = Service.defineService('managedblockchain', ['2018-09-24']); -Object.defineProperty(apiLoader.services['managedblockchain'], '2018-09-24', { - get: function get() { - var model = __nccwpck_require__(70690); - model.paginators = __nccwpck_require__(45932)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ManagedBlockchain; - - -/***/ }), - -/***/ 2609: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['marketplacecatalog'] = {}; -AWS.MarketplaceCatalog = Service.defineService('marketplacecatalog', ['2018-09-17']); -Object.defineProperty(apiLoader.services['marketplacecatalog'], '2018-09-17', { - get: function get() { - var model = __nccwpck_require__(15560); - model.paginators = __nccwpck_require__(23129)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.MarketplaceCatalog; - - -/***/ }), - -/***/ 4540: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['marketplacecommerceanalytics'] = {}; -AWS.MarketplaceCommerceAnalytics = Service.defineService('marketplacecommerceanalytics', ['2015-07-01']); -Object.defineProperty(apiLoader.services['marketplacecommerceanalytics'], '2015-07-01', { - get: function get() { - var model = __nccwpck_require__(30768); - model.paginators = __nccwpck_require__(88266)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.MarketplaceCommerceAnalytics; - - -/***/ }), - -/***/ 53707: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['marketplaceentitlementservice'] = {}; -AWS.MarketplaceEntitlementService = Service.defineService('marketplaceentitlementservice', ['2017-01-11']); -Object.defineProperty(apiLoader.services['marketplaceentitlementservice'], '2017-01-11', { - get: function get() { - var model = __nccwpck_require__(23864); - model.paginators = __nccwpck_require__(98218)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.MarketplaceEntitlementService; - - -/***/ }), - -/***/ 39297: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['marketplacemetering'] = {}; -AWS.MarketplaceMetering = Service.defineService('marketplacemetering', ['2016-01-14']); -Object.defineProperty(apiLoader.services['marketplacemetering'], '2016-01-14', { - get: function get() { - var model = __nccwpck_require__(150); - model.paginators = __nccwpck_require__(34742)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.MarketplaceMetering; - - -/***/ }), - -/***/ 67639: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['mediaconnect'] = {}; -AWS.MediaConnect = Service.defineService('mediaconnect', ['2018-11-14']); -Object.defineProperty(apiLoader.services['mediaconnect'], '2018-11-14', { - get: function get() { - var model = __nccwpck_require__(38828); - model.paginators = __nccwpck_require__(52701)/* .pagination */ .o; - model.waiters = __nccwpck_require__(69547)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.MediaConnect; - - -/***/ }), - -/***/ 57220: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['mediaconvert'] = {}; -AWS.MediaConvert = Service.defineService('mediaconvert', ['2017-08-29']); -Object.defineProperty(apiLoader.services['mediaconvert'], '2017-08-29', { - get: function get() { - var model = __nccwpck_require__(95103); - model.paginators = __nccwpck_require__(12236)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.MediaConvert; - - -/***/ }), - -/***/ 7509: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['medialive'] = {}; -AWS.MediaLive = Service.defineService('medialive', ['2017-10-14']); -Object.defineProperty(apiLoader.services['medialive'], '2017-10-14', { - get: function get() { - var model = __nccwpck_require__(71020); - model.paginators = __nccwpck_require__(45939)/* .pagination */ .o; - model.waiters = __nccwpck_require__(77702)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.MediaLive; - - -/***/ }), - -/***/ 91620: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['mediapackage'] = {}; -AWS.MediaPackage = Service.defineService('mediapackage', ['2017-10-12']); -Object.defineProperty(apiLoader.services['mediapackage'], '2017-10-12', { - get: function get() { - var model = __nccwpck_require__(3524); - model.paginators = __nccwpck_require__(28168)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.MediaPackage; - - -/***/ }), - -/***/ 14962: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['mediapackagevod'] = {}; -AWS.MediaPackageVod = Service.defineService('mediapackagevod', ['2018-11-07']); -Object.defineProperty(apiLoader.services['mediapackagevod'], '2018-11-07', { - get: function get() { - var model = __nccwpck_require__(62182); - model.paginators = __nccwpck_require__(9108)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.MediaPackageVod; - - -/***/ }), - -/***/ 83748: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['mediastore'] = {}; -AWS.MediaStore = Service.defineService('mediastore', ['2017-09-01']); -Object.defineProperty(apiLoader.services['mediastore'], '2017-09-01', { - get: function get() { - var model = __nccwpck_require__(86331); - model.paginators = __nccwpck_require__(85011)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.MediaStore; - - -/***/ }), - -/***/ 98703: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['mediastoredata'] = {}; -AWS.MediaStoreData = Service.defineService('mediastoredata', ['2017-09-01']); -Object.defineProperty(apiLoader.services['mediastoredata'], '2017-09-01', { - get: function get() { - var model = __nccwpck_require__(78855); - model.paginators = __nccwpck_require__(12340)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.MediaStoreData; - - -/***/ }), - -/***/ 99658: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['mediatailor'] = {}; -AWS.MediaTailor = Service.defineService('mediatailor', ['2018-04-23']); -Object.defineProperty(apiLoader.services['mediatailor'], '2018-04-23', { - get: function get() { - var model = __nccwpck_require__(32863); - model.paginators = __nccwpck_require__(76134)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.MediaTailor; - - -/***/ }), - -/***/ 50782: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['memorydb'] = {}; -AWS.MemoryDB = Service.defineService('memorydb', ['2021-01-01']); -Object.defineProperty(apiLoader.services['memorydb'], '2021-01-01', { - get: function get() { - var model = __nccwpck_require__(64138); - model.paginators = __nccwpck_require__(50497)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.MemoryDB; - - -/***/ }), - -/***/ 41339: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['mgn'] = {}; -AWS.Mgn = Service.defineService('mgn', ['2020-02-26']); -Object.defineProperty(apiLoader.services['mgn'], '2020-02-26', { - get: function get() { - var model = __nccwpck_require__(96297); - model.paginators = __nccwpck_require__(36566)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Mgn; - - -/***/ }), - -/***/ 14688: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['migrationhub'] = {}; -AWS.MigrationHub = Service.defineService('migrationhub', ['2017-05-31']); -Object.defineProperty(apiLoader.services['migrationhub'], '2017-05-31', { - get: function get() { - var model = __nccwpck_require__(51639); - model.paginators = __nccwpck_require__(63013)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.MigrationHub; - - -/***/ }), - -/***/ 62658: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['migrationhubconfig'] = {}; -AWS.MigrationHubConfig = Service.defineService('migrationhubconfig', ['2019-06-30']); -Object.defineProperty(apiLoader.services['migrationhubconfig'], '2019-06-30', { - get: function get() { - var model = __nccwpck_require__(89101); - model.paginators = __nccwpck_require__(59977)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.MigrationHubConfig; - - -/***/ }), - -/***/ 2925: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['migrationhubrefactorspaces'] = {}; -AWS.MigrationHubRefactorSpaces = Service.defineService('migrationhubrefactorspaces', ['2021-10-26']); -Object.defineProperty(apiLoader.services['migrationhubrefactorspaces'], '2021-10-26', { - get: function get() { - var model = __nccwpck_require__(17685); - model.paginators = __nccwpck_require__(38574)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.MigrationHubRefactorSpaces; - - -/***/ }), - -/***/ 96533: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['migrationhubstrategy'] = {}; -AWS.MigrationHubStrategy = Service.defineService('migrationhubstrategy', ['2020-02-19']); -Object.defineProperty(apiLoader.services['migrationhubstrategy'], '2020-02-19', { - get: function get() { - var model = __nccwpck_require__(42549); - model.paginators = __nccwpck_require__(37439)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.MigrationHubStrategy; - - -/***/ }), - -/***/ 39782: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['mobile'] = {}; -AWS.Mobile = Service.defineService('mobile', ['2017-07-01']); -Object.defineProperty(apiLoader.services['mobile'], '2017-07-01', { - get: function get() { - var model = __nccwpck_require__(44027); - model.paginators = __nccwpck_require__(81940)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Mobile; - - -/***/ }), - -/***/ 66690: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['mobileanalytics'] = {}; -AWS.MobileAnalytics = Service.defineService('mobileanalytics', ['2014-06-05']); -Object.defineProperty(apiLoader.services['mobileanalytics'], '2014-06-05', { - get: function get() { - var model = __nccwpck_require__(40634); - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.MobileAnalytics; - - -/***/ }), - -/***/ 23093: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['mq'] = {}; -AWS.MQ = Service.defineService('mq', ['2017-11-27']); -Object.defineProperty(apiLoader.services['mq'], '2017-11-27', { - get: function get() { - var model = __nccwpck_require__(73219); - model.paginators = __nccwpck_require__(59835)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.MQ; - - -/***/ }), - -/***/ 79954: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['mturk'] = {}; -AWS.MTurk = Service.defineService('mturk', ['2017-01-17']); -Object.defineProperty(apiLoader.services['mturk'], '2017-01-17', { - get: function get() { - var model = __nccwpck_require__(55676); - model.paginators = __nccwpck_require__(51396)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.MTurk; - - -/***/ }), - -/***/ 32712: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['mwaa'] = {}; -AWS.MWAA = Service.defineService('mwaa', ['2020-07-01']); -Object.defineProperty(apiLoader.services['mwaa'], '2020-07-01', { - get: function get() { - var model = __nccwpck_require__(3499); - model.paginators = __nccwpck_require__(30606)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.MWAA; - - -/***/ }), - -/***/ 30047: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['neptune'] = {}; -AWS.Neptune = Service.defineService('neptune', ['2014-10-31']); -__nccwpck_require__(73090); -Object.defineProperty(apiLoader.services['neptune'], '2014-10-31', { - get: function get() { - var model = __nccwpck_require__(44749); - model.paginators = __nccwpck_require__(36058)/* .pagination */ .o; - model.waiters = __nccwpck_require__(83629)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Neptune; - - -/***/ }), - -/***/ 84626: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['networkfirewall'] = {}; -AWS.NetworkFirewall = Service.defineService('networkfirewall', ['2020-11-12']); -Object.defineProperty(apiLoader.services['networkfirewall'], '2020-11-12', { - get: function get() { - var model = __nccwpck_require__(71930); - model.paginators = __nccwpck_require__(50334)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.NetworkFirewall; - - -/***/ }), - -/***/ 37610: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['networkmanager'] = {}; -AWS.NetworkManager = Service.defineService('networkmanager', ['2019-07-05']); -Object.defineProperty(apiLoader.services['networkmanager'], '2019-07-05', { - get: function get() { - var model = __nccwpck_require__(11902); - model.paginators = __nccwpck_require__(91477)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.NetworkManager; - - -/***/ }), - -/***/ 89428: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['nimble'] = {}; -AWS.Nimble = Service.defineService('nimble', ['2020-08-01']); -Object.defineProperty(apiLoader.services['nimble'], '2020-08-01', { - get: function get() { - var model = __nccwpck_require__(95712); - model.paginators = __nccwpck_require__(98909)/* .pagination */ .o; - model.waiters = __nccwpck_require__(90597)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Nimble; - - -/***/ }), - -/***/ 60358: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['opensearch'] = {}; -AWS.OpenSearch = Service.defineService('opensearch', ['2021-01-01']); -Object.defineProperty(apiLoader.services['opensearch'], '2021-01-01', { - get: function get() { - var model = __nccwpck_require__(19949); - model.paginators = __nccwpck_require__(55508)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.OpenSearch; - - -/***/ }), - -/***/ 75691: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['opsworks'] = {}; -AWS.OpsWorks = Service.defineService('opsworks', ['2013-02-18']); -Object.defineProperty(apiLoader.services['opsworks'], '2013-02-18', { - get: function get() { - var model = __nccwpck_require__(95315); - model.paginators = __nccwpck_require__(63589)/* .pagination */ .o; - model.waiters = __nccwpck_require__(8700)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.OpsWorks; - - -/***/ }), - -/***/ 80388: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['opsworkscm'] = {}; -AWS.OpsWorksCM = Service.defineService('opsworkscm', ['2016-11-01']); -Object.defineProperty(apiLoader.services['opsworkscm'], '2016-11-01', { - get: function get() { - var model = __nccwpck_require__(25033); - model.paginators = __nccwpck_require__(68422)/* .pagination */ .o; - model.waiters = __nccwpck_require__(89353)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.OpsWorksCM; - - -/***/ }), - -/***/ 44670: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['organizations'] = {}; -AWS.Organizations = Service.defineService('organizations', ['2016-11-28']); -Object.defineProperty(apiLoader.services['organizations'], '2016-11-28', { - get: function get() { - var model = __nccwpck_require__(28258); - model.paginators = __nccwpck_require__(70916)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Organizations; - - -/***/ }), - -/***/ 27551: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['outposts'] = {}; -AWS.Outposts = Service.defineService('outposts', ['2019-12-03']); -Object.defineProperty(apiLoader.services['outposts'], '2019-12-03', { - get: function get() { - var model = __nccwpck_require__(79304); - model.paginators = __nccwpck_require__(91740)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Outposts; - - -/***/ }), - -/***/ 20368: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['panorama'] = {}; -AWS.Panorama = Service.defineService('panorama', ['2019-07-24']); -Object.defineProperty(apiLoader.services['panorama'], '2019-07-24', { - get: function get() { - var model = __nccwpck_require__(11360); - model.paginators = __nccwpck_require__(85327)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Panorama; - - -/***/ }), - -/***/ 33696: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['personalize'] = {}; -AWS.Personalize = Service.defineService('personalize', ['2018-05-22']); -Object.defineProperty(apiLoader.services['personalize'], '2018-05-22', { - get: function get() { - var model = __nccwpck_require__(16402); - model.paginators = __nccwpck_require__(76828)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Personalize; - - -/***/ }), - -/***/ 88170: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['personalizeevents'] = {}; -AWS.PersonalizeEvents = Service.defineService('personalizeevents', ['2018-03-22']); -Object.defineProperty(apiLoader.services['personalizeevents'], '2018-03-22', { - get: function get() { - var model = __nccwpck_require__(8792); - model.paginators = __nccwpck_require__(52110)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.PersonalizeEvents; - - -/***/ }), - -/***/ 66184: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['personalizeruntime'] = {}; -AWS.PersonalizeRuntime = Service.defineService('personalizeruntime', ['2018-05-22']); -Object.defineProperty(apiLoader.services['personalizeruntime'], '2018-05-22', { - get: function get() { - var model = __nccwpck_require__(86682); - model.paginators = __nccwpck_require__(32049)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.PersonalizeRuntime; - - -/***/ }), - -/***/ 15505: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['pi'] = {}; -AWS.PI = Service.defineService('pi', ['2018-02-27']); -Object.defineProperty(apiLoader.services['pi'], '2018-02-27', { - get: function get() { - var model = __nccwpck_require__(38006); - model.paginators = __nccwpck_require__(75147)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.PI; - - -/***/ }), - -/***/ 18388: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['pinpoint'] = {}; -AWS.Pinpoint = Service.defineService('pinpoint', ['2016-12-01']); -Object.defineProperty(apiLoader.services['pinpoint'], '2016-12-01', { - get: function get() { - var model = __nccwpck_require__(73536); - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Pinpoint; - - -/***/ }), - -/***/ 83060: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['pinpointemail'] = {}; -AWS.PinpointEmail = Service.defineService('pinpointemail', ['2018-07-26']); -Object.defineProperty(apiLoader.services['pinpointemail'], '2018-07-26', { - get: function get() { - var model = __nccwpck_require__(42680); - model.paginators = __nccwpck_require__(58107)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.PinpointEmail; - - -/***/ }), - -/***/ 46605: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['pinpointsmsvoice'] = {}; -AWS.PinpointSMSVoice = Service.defineService('pinpointsmsvoice', ['2018-09-05']); -Object.defineProperty(apiLoader.services['pinpointsmsvoice'], '2018-09-05', { - get: function get() { - var model = __nccwpck_require__(6641); - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.PinpointSMSVoice; - - -/***/ }), - -/***/ 97332: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['polly'] = {}; -AWS.Polly = Service.defineService('polly', ['2016-06-10']); -__nccwpck_require__(53199); -Object.defineProperty(apiLoader.services['polly'], '2016-06-10', { - get: function get() { - var model = __nccwpck_require__(58020); - model.paginators = __nccwpck_require__(28573)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Polly; - - -/***/ }), - -/***/ 92765: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['pricing'] = {}; -AWS.Pricing = Service.defineService('pricing', ['2017-10-15']); -Object.defineProperty(apiLoader.services['pricing'], '2017-10-15', { - get: function get() { - var model = __nccwpck_require__(19792); - model.paginators = __nccwpck_require__(45992)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Pricing; - - -/***/ }), - -/***/ 9275: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['proton'] = {}; -AWS.Proton = Service.defineService('proton', ['2020-07-20']); -Object.defineProperty(apiLoader.services['proton'], '2020-07-20', { - get: function get() { - var model = __nccwpck_require__(39939); - model.paginators = __nccwpck_require__(18911)/* .pagination */ .o; - model.waiters = __nccwpck_require__(64)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Proton; - - -/***/ }), - -/***/ 71266: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['qldb'] = {}; -AWS.QLDB = Service.defineService('qldb', ['2019-01-02']); -Object.defineProperty(apiLoader.services['qldb'], '2019-01-02', { - get: function get() { - var model = __nccwpck_require__(52675); - model.paginators = __nccwpck_require__(4367)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.QLDB; - - -/***/ }), - -/***/ 55423: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['qldbsession'] = {}; -AWS.QLDBSession = Service.defineService('qldbsession', ['2019-07-11']); -Object.defineProperty(apiLoader.services['qldbsession'], '2019-07-11', { - get: function get() { - var model = __nccwpck_require__(67426); - model.paginators = __nccwpck_require__(96527)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.QLDBSession; - - -/***/ }), - -/***/ 29898: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['quicksight'] = {}; -AWS.QuickSight = Service.defineService('quicksight', ['2018-04-01']); -Object.defineProperty(apiLoader.services['quicksight'], '2018-04-01', { - get: function get() { - var model = __nccwpck_require__(6807); - model.paginators = __nccwpck_require__(81489)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.QuickSight; - - -/***/ }), - -/***/ 94394: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['ram'] = {}; -AWS.RAM = Service.defineService('ram', ['2018-01-04']); -Object.defineProperty(apiLoader.services['ram'], '2018-01-04', { - get: function get() { - var model = __nccwpck_require__(83728); - model.paginators = __nccwpck_require__(83147)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.RAM; - - -/***/ }), - -/***/ 70145: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['rbin'] = {}; -AWS.Rbin = Service.defineService('rbin', ['2021-06-15']); -Object.defineProperty(apiLoader.services['rbin'], '2021-06-15', { - get: function get() { - var model = __nccwpck_require__(95122); - model.paginators = __nccwpck_require__(28107)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Rbin; - - -/***/ }), - -/***/ 71578: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['rds'] = {}; -AWS.RDS = Service.defineService('rds', ['2013-01-10', '2013-02-12', '2013-09-09', '2014-09-01', '2014-09-01*', '2014-10-31']); -__nccwpck_require__(71928); -Object.defineProperty(apiLoader.services['rds'], '2013-01-10', { - get: function get() { - var model = __nccwpck_require__(56144); - model.paginators = __nccwpck_require__(76660)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); -Object.defineProperty(apiLoader.services['rds'], '2013-02-12', { - get: function get() { - var model = __nccwpck_require__(15633); - model.paginators = __nccwpck_require__(37654)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); -Object.defineProperty(apiLoader.services['rds'], '2013-09-09', { - get: function get() { - var model = __nccwpck_require__(53439); - model.paginators = __nccwpck_require__(17223)/* .pagination */ .o; - model.waiters = __nccwpck_require__(60967)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); -Object.defineProperty(apiLoader.services['rds'], '2014-09-01', { - get: function get() { - var model = __nccwpck_require__(72333); - model.paginators = __nccwpck_require__(86022)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); -Object.defineProperty(apiLoader.services['rds'], '2014-10-31', { - get: function get() { - var model = __nccwpck_require__(6210); - model.paginators = __nccwpck_require__(60972)/* .pagination */ .o; - model.waiters = __nccwpck_require__(6606)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.RDS; - - -/***/ }), - -/***/ 30147: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['rdsdataservice'] = {}; -AWS.RDSDataService = Service.defineService('rdsdataservice', ['2018-08-01']); -__nccwpck_require__(64070); -Object.defineProperty(apiLoader.services['rdsdataservice'], '2018-08-01', { - get: function get() { - var model = __nccwpck_require__(4983); - model.paginators = __nccwpck_require__(1270)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.RDSDataService; - - -/***/ }), - -/***/ 84853: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['redshift'] = {}; -AWS.Redshift = Service.defineService('redshift', ['2012-12-01']); -Object.defineProperty(apiLoader.services['redshift'], '2012-12-01', { - get: function get() { - var model = __nccwpck_require__(17066); - model.paginators = __nccwpck_require__(7755)/* .pagination */ .o; - model.waiters = __nccwpck_require__(91400)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Redshift; - - -/***/ }), - -/***/ 203: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['redshiftdata'] = {}; -AWS.RedshiftData = Service.defineService('redshiftdata', ['2019-12-20']); -Object.defineProperty(apiLoader.services['redshiftdata'], '2019-12-20', { - get: function get() { - var model = __nccwpck_require__(34805); - model.paginators = __nccwpck_require__(28484)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.RedshiftData; - - -/***/ }), - -/***/ 65470: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['rekognition'] = {}; -AWS.Rekognition = Service.defineService('rekognition', ['2016-06-27']); -Object.defineProperty(apiLoader.services['rekognition'], '2016-06-27', { - get: function get() { - var model = __nccwpck_require__(65852); - model.paginators = __nccwpck_require__(49860)/* .pagination */ .o; - model.waiters = __nccwpck_require__(19491)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Rekognition; - - -/***/ }), - -/***/ 21173: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['resiliencehub'] = {}; -AWS.Resiliencehub = Service.defineService('resiliencehub', ['2020-04-30']); -Object.defineProperty(apiLoader.services['resiliencehub'], '2020-04-30', { - get: function get() { - var model = __nccwpck_require__(69249); - model.paginators = __nccwpck_require__(56661)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Resiliencehub; - - -/***/ }), - -/***/ 58756: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['resourcegroups'] = {}; -AWS.ResourceGroups = Service.defineService('resourcegroups', ['2017-11-27']); -Object.defineProperty(apiLoader.services['resourcegroups'], '2017-11-27', { - get: function get() { - var model = __nccwpck_require__(28629); - model.paginators = __nccwpck_require__(71378)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ResourceGroups; - - -/***/ }), - -/***/ 7385: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['resourcegroupstaggingapi'] = {}; -AWS.ResourceGroupsTaggingAPI = Service.defineService('resourcegroupstaggingapi', ['2017-01-26']); -Object.defineProperty(apiLoader.services['resourcegroupstaggingapi'], '2017-01-26', { - get: function get() { - var model = __nccwpck_require__(83914); - model.paginators = __nccwpck_require__(64865)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ResourceGroupsTaggingAPI; - - -/***/ }), - -/***/ 18068: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['robomaker'] = {}; -AWS.RoboMaker = Service.defineService('robomaker', ['2018-06-29']); -Object.defineProperty(apiLoader.services['robomaker'], '2018-06-29', { - get: function get() { - var model = __nccwpck_require__(36854); - model.paginators = __nccwpck_require__(52592)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.RoboMaker; - - -/***/ }), - -/***/ 44968: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['route53'] = {}; -AWS.Route53 = Service.defineService('route53', ['2013-04-01']); -__nccwpck_require__(69627); -Object.defineProperty(apiLoader.services['route53'], '2013-04-01', { - get: function get() { - var model = __nccwpck_require__(91499); - model.paginators = __nccwpck_require__(54519)/* .pagination */ .o; - model.waiters = __nccwpck_require__(4628)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Route53; - - -/***/ }), - -/***/ 51994: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['route53domains'] = {}; -AWS.Route53Domains = Service.defineService('route53domains', ['2014-05-15']); -Object.defineProperty(apiLoader.services['route53domains'], '2014-05-15', { - get: function get() { - var model = __nccwpck_require__(6535); - model.paginators = __nccwpck_require__(26777)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Route53Domains; - - -/***/ }), - -/***/ 35738: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['route53recoverycluster'] = {}; -AWS.Route53RecoveryCluster = Service.defineService('route53recoverycluster', ['2019-12-02']); -Object.defineProperty(apiLoader.services['route53recoverycluster'], '2019-12-02', { - get: function get() { - var model = __nccwpck_require__(77257); - model.paginators = __nccwpck_require__(33426)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Route53RecoveryCluster; - - -/***/ }), - -/***/ 16063: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['route53recoverycontrolconfig'] = {}; -AWS.Route53RecoveryControlConfig = Service.defineService('route53recoverycontrolconfig', ['2020-11-02']); -Object.defineProperty(apiLoader.services['route53recoverycontrolconfig'], '2020-11-02', { - get: function get() { - var model = __nccwpck_require__(29886); - model.paginators = __nccwpck_require__(43116)/* .pagination */ .o; - model.waiters = __nccwpck_require__(79230)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Route53RecoveryControlConfig; - - -/***/ }), - -/***/ 79106: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['route53recoveryreadiness'] = {}; -AWS.Route53RecoveryReadiness = Service.defineService('route53recoveryreadiness', ['2019-12-02']); -Object.defineProperty(apiLoader.services['route53recoveryreadiness'], '2019-12-02', { - get: function get() { - var model = __nccwpck_require__(41608); - model.paginators = __nccwpck_require__(70416)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Route53RecoveryReadiness; - - -/***/ }), - -/***/ 25894: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['route53resolver'] = {}; -AWS.Route53Resolver = Service.defineService('route53resolver', ['2018-04-01']); -Object.defineProperty(apiLoader.services['route53resolver'], '2018-04-01', { - get: function get() { - var model = __nccwpck_require__(99309); - model.paginators = __nccwpck_require__(21261)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Route53Resolver; - - -/***/ }), - -/***/ 53237: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['rum'] = {}; -AWS.RUM = Service.defineService('rum', ['2018-05-10']); -Object.defineProperty(apiLoader.services['rum'], '2018-05-10', { - get: function get() { - var model = __nccwpck_require__(22298); - model.paginators = __nccwpck_require__(67053)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.RUM; - - -/***/ }), - -/***/ 83256: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['s3'] = {}; -AWS.S3 = Service.defineService('s3', ['2006-03-01']); -__nccwpck_require__(26543); -Object.defineProperty(apiLoader.services['s3'], '2006-03-01', { - get: function get() { - var model = __nccwpck_require__(32581); - model.paginators = __nccwpck_require__(53175)/* .pagination */ .o; - model.waiters = __nccwpck_require__(44494)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.S3; - - -/***/ }), - -/***/ 99817: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['s3control'] = {}; -AWS.S3Control = Service.defineService('s3control', ['2018-08-20']); -__nccwpck_require__(71207); -Object.defineProperty(apiLoader.services['s3control'], '2018-08-20', { - get: function get() { - var model = __nccwpck_require__(52092); - model.paginators = __nccwpck_require__(62498)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.S3Control; - - -/***/ }), - -/***/ 90493: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['s3outposts'] = {}; -AWS.S3Outposts = Service.defineService('s3outposts', ['2017-07-25']); -Object.defineProperty(apiLoader.services['s3outposts'], '2017-07-25', { - get: function get() { - var model = __nccwpck_require__(90331); - model.paginators = __nccwpck_require__(8746)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.S3Outposts; - - -/***/ }), - -/***/ 77657: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['sagemaker'] = {}; -AWS.SageMaker = Service.defineService('sagemaker', ['2017-07-24']); -Object.defineProperty(apiLoader.services['sagemaker'], '2017-07-24', { - get: function get() { - var model = __nccwpck_require__(20227); - model.paginators = __nccwpck_require__(44955)/* .pagination */ .o; - model.waiters = __nccwpck_require__(50026)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.SageMaker; - - -/***/ }), - -/***/ 38966: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['sagemakeredge'] = {}; -AWS.SagemakerEdge = Service.defineService('sagemakeredge', ['2020-09-23']); -Object.defineProperty(apiLoader.services['sagemakeredge'], '2020-09-23', { - get: function get() { - var model = __nccwpck_require__(48750); - model.paginators = __nccwpck_require__(2769)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.SagemakerEdge; - - -/***/ }), - -/***/ 67644: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['sagemakerfeaturestoreruntime'] = {}; -AWS.SageMakerFeatureStoreRuntime = Service.defineService('sagemakerfeaturestoreruntime', ['2020-07-01']); -Object.defineProperty(apiLoader.services['sagemakerfeaturestoreruntime'], '2020-07-01', { - get: function get() { - var model = __nccwpck_require__(98420); - model.paginators = __nccwpck_require__(45590)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.SageMakerFeatureStoreRuntime; - - -/***/ }), - -/***/ 85044: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['sagemakerruntime'] = {}; -AWS.SageMakerRuntime = Service.defineService('sagemakerruntime', ['2017-05-13']); -Object.defineProperty(apiLoader.services['sagemakerruntime'], '2017-05-13', { - get: function get() { - var model = __nccwpck_require__(82783); - model.paginators = __nccwpck_require__(17272)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.SageMakerRuntime; - - -/***/ }), - -/***/ 62825: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['savingsplans'] = {}; -AWS.SavingsPlans = Service.defineService('savingsplans', ['2019-06-28']); -Object.defineProperty(apiLoader.services['savingsplans'], '2019-06-28', { - get: function get() { - var model = __nccwpck_require__(2810); - model.paginators = __nccwpck_require__(56794)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.SavingsPlans; - - -/***/ }), - -/***/ 55713: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['schemas'] = {}; -AWS.Schemas = Service.defineService('schemas', ['2019-12-02']); -Object.defineProperty(apiLoader.services['schemas'], '2019-12-02', { - get: function get() { - var model = __nccwpck_require__(85225); - model.paginators = __nccwpck_require__(50738)/* .pagination */ .o; - model.waiters = __nccwpck_require__(34671)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Schemas; - - -/***/ }), - -/***/ 85131: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['secretsmanager'] = {}; -AWS.SecretsManager = Service.defineService('secretsmanager', ['2017-10-17']); -Object.defineProperty(apiLoader.services['secretsmanager'], '2017-10-17', { - get: function get() { - var model = __nccwpck_require__(97209); - model.paginators = __nccwpck_require__(38503)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.SecretsManager; - - -/***/ }), - -/***/ 21550: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['securityhub'] = {}; -AWS.SecurityHub = Service.defineService('securityhub', ['2018-10-26']); -Object.defineProperty(apiLoader.services['securityhub'], '2018-10-26', { - get: function get() { - var model = __nccwpck_require__(40359); - model.paginators = __nccwpck_require__(27612)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.SecurityHub; - - -/***/ }), - -/***/ 62402: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['serverlessapplicationrepository'] = {}; -AWS.ServerlessApplicationRepository = Service.defineService('serverlessapplicationrepository', ['2017-09-08']); -Object.defineProperty(apiLoader.services['serverlessapplicationrepository'], '2017-09-08', { - get: function get() { - var model = __nccwpck_require__(8591); - model.paginators = __nccwpck_require__(96164)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ServerlessApplicationRepository; - - -/***/ }), - -/***/ 822: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['servicecatalog'] = {}; -AWS.ServiceCatalog = Service.defineService('servicecatalog', ['2015-12-10']); -Object.defineProperty(apiLoader.services['servicecatalog'], '2015-12-10', { - get: function get() { - var model = __nccwpck_require__(80503); - model.paginators = __nccwpck_require__(71855)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ServiceCatalog; - - -/***/ }), - -/***/ 79068: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['servicecatalogappregistry'] = {}; -AWS.ServiceCatalogAppRegistry = Service.defineService('servicecatalogappregistry', ['2020-06-24']); -Object.defineProperty(apiLoader.services['servicecatalogappregistry'], '2020-06-24', { - get: function get() { - var model = __nccwpck_require__(47635); - model.paginators = __nccwpck_require__(67278)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ServiceCatalogAppRegistry; - - -/***/ }), - -/***/ 91569: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['servicediscovery'] = {}; -AWS.ServiceDiscovery = Service.defineService('servicediscovery', ['2017-03-14']); -Object.defineProperty(apiLoader.services['servicediscovery'], '2017-03-14', { - get: function get() { - var model = __nccwpck_require__(20459); - model.paginators = __nccwpck_require__(19834)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ServiceDiscovery; - - -/***/ }), - -/***/ 57800: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['servicequotas'] = {}; -AWS.ServiceQuotas = Service.defineService('servicequotas', ['2019-06-24']); -Object.defineProperty(apiLoader.services['servicequotas'], '2019-06-24', { - get: function get() { - var model = __nccwpck_require__(14304); - model.paginators = __nccwpck_require__(90635)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.ServiceQuotas; - - -/***/ }), - -/***/ 46816: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['ses'] = {}; -AWS.SES = Service.defineService('ses', ['2010-12-01']); -Object.defineProperty(apiLoader.services['ses'], '2010-12-01', { - get: function get() { - var model = __nccwpck_require__(87825); - model.paginators = __nccwpck_require__(61348)/* .pagination */ .o; - model.waiters = __nccwpck_require__(84476)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.SES; - - -/***/ }), - -/***/ 20142: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['sesv2'] = {}; -AWS.SESV2 = Service.defineService('sesv2', ['2019-09-27']); -Object.defineProperty(apiLoader.services['sesv2'], '2019-09-27', { - get: function get() { - var model = __nccwpck_require__(32530); - model.paginators = __nccwpck_require__(39567)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.SESV2; - - -/***/ }), - -/***/ 20271: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['shield'] = {}; -AWS.Shield = Service.defineService('shield', ['2016-06-02']); -Object.defineProperty(apiLoader.services['shield'], '2016-06-02', { - get: function get() { - var model = __nccwpck_require__(78621); - model.paginators = __nccwpck_require__(75743)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Shield; - - -/***/ }), - -/***/ 71596: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['signer'] = {}; -AWS.Signer = Service.defineService('signer', ['2017-08-25']); -Object.defineProperty(apiLoader.services['signer'], '2017-08-25', { - get: function get() { - var model = __nccwpck_require__(21884); - model.paginators = __nccwpck_require__(69839)/* .pagination */ .o; - model.waiters = __nccwpck_require__(61331)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Signer; - - -/***/ }), - -/***/ 10120: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['simpledb'] = {}; -AWS.SimpleDB = Service.defineService('simpledb', ['2009-04-15']); -Object.defineProperty(apiLoader.services['simpledb'], '2009-04-15', { - get: function get() { - var model = __nccwpck_require__(96016); - model.paginators = __nccwpck_require__(73820)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.SimpleDB; - - -/***/ }), - -/***/ 57719: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['sms'] = {}; -AWS.SMS = Service.defineService('sms', ['2016-10-24']); -Object.defineProperty(apiLoader.services['sms'], '2016-10-24', { - get: function get() { - var model = __nccwpck_require__(51530); - model.paginators = __nccwpck_require__(72874)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.SMS; - - -/***/ }), - -/***/ 510: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['snowball'] = {}; -AWS.Snowball = Service.defineService('snowball', ['2016-06-30']); -Object.defineProperty(apiLoader.services['snowball'], '2016-06-30', { - get: function get() { - var model = __nccwpck_require__(41624); - model.paginators = __nccwpck_require__(14147)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Snowball; - - -/***/ }), - -/***/ 64655: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['snowdevicemanagement'] = {}; -AWS.SnowDeviceManagement = Service.defineService('snowdevicemanagement', ['2021-08-04']); -Object.defineProperty(apiLoader.services['snowdevicemanagement'], '2021-08-04', { - get: function get() { - var model = __nccwpck_require__(94140); - model.paginators = __nccwpck_require__(20626)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.SnowDeviceManagement; - - -/***/ }), - -/***/ 28581: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['sns'] = {}; -AWS.SNS = Service.defineService('sns', ['2010-03-31']); -Object.defineProperty(apiLoader.services['sns'], '2010-03-31', { - get: function get() { - var model = __nccwpck_require__(22671); - model.paginators = __nccwpck_require__(92788)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.SNS; - - -/***/ }), - -/***/ 63172: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['sqs'] = {}; -AWS.SQS = Service.defineService('sqs', ['2012-11-05']); -__nccwpck_require__(94571); -Object.defineProperty(apiLoader.services['sqs'], '2012-11-05', { - get: function get() { - var model = __nccwpck_require__(31635); - model.paginators = __nccwpck_require__(48324)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.SQS; - - -/***/ }), - -/***/ 83380: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['ssm'] = {}; -AWS.SSM = Service.defineService('ssm', ['2014-11-06']); -Object.defineProperty(apiLoader.services['ssm'], '2014-11-06', { - get: function get() { - var model = __nccwpck_require__(7667); - model.paginators = __nccwpck_require__(84951)/* .pagination */ .o; - model.waiters = __nccwpck_require__(80315)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.SSM; - - -/***/ }), - -/***/ 12577: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['ssmcontacts'] = {}; -AWS.SSMContacts = Service.defineService('ssmcontacts', ['2021-05-03']); -Object.defineProperty(apiLoader.services['ssmcontacts'], '2021-05-03', { - get: function get() { - var model = __nccwpck_require__(99205); - model.paginators = __nccwpck_require__(49636)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.SSMContacts; - - -/***/ }), - -/***/ 20590: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['ssmincidents'] = {}; -AWS.SSMIncidents = Service.defineService('ssmincidents', ['2018-05-10']); -Object.defineProperty(apiLoader.services['ssmincidents'], '2018-05-10', { - get: function get() { - var model = __nccwpck_require__(16847); - model.paginators = __nccwpck_require__(30464)/* .pagination */ .o; - model.waiters = __nccwpck_require__(23020)/* .waiters */ .V; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.SSMIncidents; - - -/***/ }), - -/***/ 71096: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['sso'] = {}; -AWS.SSO = Service.defineService('sso', ['2019-06-10']); -Object.defineProperty(apiLoader.services['sso'], '2019-06-10', { - get: function get() { - var model = __nccwpck_require__(77888); - model.paginators = __nccwpck_require__(18046)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.SSO; - - -/***/ }), - -/***/ 66644: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['ssoadmin'] = {}; -AWS.SSOAdmin = Service.defineService('ssoadmin', ['2020-07-20']); -Object.defineProperty(apiLoader.services['ssoadmin'], '2020-07-20', { - get: function get() { - var model = __nccwpck_require__(93165); - model.paginators = __nccwpck_require__(61022)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.SSOAdmin; - - -/***/ }), - -/***/ 49870: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['ssooidc'] = {}; -AWS.SSOOIDC = Service.defineService('ssooidc', ['2019-06-10']); -Object.defineProperty(apiLoader.services['ssooidc'], '2019-06-10', { - get: function get() { - var model = __nccwpck_require__(43979); - model.paginators = __nccwpck_require__(16125)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.SSOOIDC; - - -/***/ }), - -/***/ 8136: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['stepfunctions'] = {}; -AWS.StepFunctions = Service.defineService('stepfunctions', ['2016-11-23']); -Object.defineProperty(apiLoader.services['stepfunctions'], '2016-11-23', { - get: function get() { - var model = __nccwpck_require__(58492); - model.paginators = __nccwpck_require__(95424)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.StepFunctions; - - -/***/ }), - -/***/ 89190: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['storagegateway'] = {}; -AWS.StorageGateway = Service.defineService('storagegateway', ['2013-06-30']); -Object.defineProperty(apiLoader.services['storagegateway'], '2013-06-30', { - get: function get() { - var model = __nccwpck_require__(33480); - model.paginators = __nccwpck_require__(6062)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.StorageGateway; - - -/***/ }), - -/***/ 57513: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['sts'] = {}; -AWS.STS = Service.defineService('sts', ['2011-06-15']); -__nccwpck_require__(91055); -Object.defineProperty(apiLoader.services['sts'], '2011-06-15', { - get: function get() { - var model = __nccwpck_require__(18976); - model.paginators = __nccwpck_require__(82952)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.STS; - - -/***/ }), - -/***/ 1099: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['support'] = {}; -AWS.Support = Service.defineService('support', ['2013-04-15']); -Object.defineProperty(apiLoader.services['support'], '2013-04-15', { - get: function get() { - var model = __nccwpck_require__(77180); - model.paginators = __nccwpck_require__(83878)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Support; - - -/***/ }), - -/***/ 32327: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['swf'] = {}; -AWS.SWF = Service.defineService('swf', ['2012-01-25']); -__nccwpck_require__(31987); -Object.defineProperty(apiLoader.services['swf'], '2012-01-25', { - get: function get() { - var model = __nccwpck_require__(4974); - model.paginators = __nccwpck_require__(65798)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.SWF; - - -/***/ }), - -/***/ 25910: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['synthetics'] = {}; -AWS.Synthetics = Service.defineService('synthetics', ['2017-10-11']); -Object.defineProperty(apiLoader.services['synthetics'], '2017-10-11', { - get: function get() { - var model = __nccwpck_require__(82853); - model.paginators = __nccwpck_require__(27742)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Synthetics; - - -/***/ }), - -/***/ 58523: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['textract'] = {}; -AWS.Textract = Service.defineService('textract', ['2018-06-27']); -Object.defineProperty(apiLoader.services['textract'], '2018-06-27', { - get: function get() { - var model = __nccwpck_require__(66368); - model.paginators = __nccwpck_require__(75909)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Textract; - - -/***/ }), - -/***/ 24529: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['timestreamquery'] = {}; -AWS.TimestreamQuery = Service.defineService('timestreamquery', ['2018-11-01']); -Object.defineProperty(apiLoader.services['timestreamquery'], '2018-11-01', { - get: function get() { - var model = __nccwpck_require__(27578); - model.paginators = __nccwpck_require__(99094)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.TimestreamQuery; - - -/***/ }), - -/***/ 1573: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['timestreamwrite'] = {}; -AWS.TimestreamWrite = Service.defineService('timestreamwrite', ['2018-11-01']); -Object.defineProperty(apiLoader.services['timestreamwrite'], '2018-11-01', { - get: function get() { - var model = __nccwpck_require__(79095); - model.paginators = __nccwpck_require__(50262)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.TimestreamWrite; - - -/***/ }), - -/***/ 75811: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['transcribeservice'] = {}; -AWS.TranscribeService = Service.defineService('transcribeservice', ['2017-10-26']); -Object.defineProperty(apiLoader.services['transcribeservice'], '2017-10-26', { - get: function get() { - var model = __nccwpck_require__(10903); - model.paginators = __nccwpck_require__(92036)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.TranscribeService; - - -/***/ }), - -/***/ 51585: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['transfer'] = {}; -AWS.Transfer = Service.defineService('transfer', ['2018-11-05']); -Object.defineProperty(apiLoader.services['transfer'], '2018-11-05', { - get: function get() { - var model = __nccwpck_require__(42419); - model.paginators = __nccwpck_require__(70586)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Transfer; - - -/***/ }), - -/***/ 72544: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['translate'] = {}; -AWS.Translate = Service.defineService('translate', ['2017-07-01']); -Object.defineProperty(apiLoader.services['translate'], '2017-07-01', { - get: function get() { - var model = __nccwpck_require__(12983); - model.paginators = __nccwpck_require__(85886)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Translate; - - -/***/ }), - -/***/ 28747: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['voiceid'] = {}; -AWS.VoiceID = Service.defineService('voiceid', ['2021-09-27']); -Object.defineProperty(apiLoader.services['voiceid'], '2021-09-27', { - get: function get() { - var model = __nccwpck_require__(12372); - model.paginators = __nccwpck_require__(89603)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.VoiceID; - - -/***/ }), - -/***/ 72742: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['waf'] = {}; -AWS.WAF = Service.defineService('waf', ['2015-08-24']); -Object.defineProperty(apiLoader.services['waf'], '2015-08-24', { - get: function get() { - var model = __nccwpck_require__(93997); - model.paginators = __nccwpck_require__(45770)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.WAF; - - -/***/ }), - -/***/ 23153: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['wafregional'] = {}; -AWS.WAFRegional = Service.defineService('wafregional', ['2016-11-28']); -Object.defineProperty(apiLoader.services['wafregional'], '2016-11-28', { - get: function get() { - var model = __nccwpck_require__(72867); - model.paginators = __nccwpck_require__(68917)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.WAFRegional; - - -/***/ }), - -/***/ 50353: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['wafv2'] = {}; -AWS.WAFV2 = Service.defineService('wafv2', ['2019-07-29']); -Object.defineProperty(apiLoader.services['wafv2'], '2019-07-29', { - get: function get() { - var model = __nccwpck_require__(27916); - model.paginators = __nccwpck_require__(51265)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.WAFV2; - - -/***/ }), - -/***/ 86263: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['wellarchitected'] = {}; -AWS.WellArchitected = Service.defineService('wellarchitected', ['2020-03-31']); -Object.defineProperty(apiLoader.services['wellarchitected'], '2020-03-31', { - get: function get() { - var model = __nccwpck_require__(5684); - model.paginators = __nccwpck_require__(47645)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.WellArchitected; - - -/***/ }), - -/***/ 85266: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['wisdom'] = {}; -AWS.Wisdom = Service.defineService('wisdom', ['2020-10-19']); -Object.defineProperty(apiLoader.services['wisdom'], '2020-10-19', { - get: function get() { - var model = __nccwpck_require__(95090); - model.paginators = __nccwpck_require__(52237)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.Wisdom; - - -/***/ }), - -/***/ 38835: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['workdocs'] = {}; -AWS.WorkDocs = Service.defineService('workdocs', ['2016-05-01']); -Object.defineProperty(apiLoader.services['workdocs'], '2016-05-01', { - get: function get() { - var model = __nccwpck_require__(12789); - model.paginators = __nccwpck_require__(20074)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.WorkDocs; - - -/***/ }), - -/***/ 48579: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['worklink'] = {}; -AWS.WorkLink = Service.defineService('worklink', ['2018-09-25']); -Object.defineProperty(apiLoader.services['worklink'], '2018-09-25', { - get: function get() { - var model = __nccwpck_require__(44786); - model.paginators = __nccwpck_require__(88012)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.WorkLink; - - -/***/ }), - -/***/ 38374: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['workmail'] = {}; -AWS.WorkMail = Service.defineService('workmail', ['2017-10-01']); -Object.defineProperty(apiLoader.services['workmail'], '2017-10-01', { - get: function get() { - var model = __nccwpck_require__(31611); - model.paginators = __nccwpck_require__(64931)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.WorkMail; - - -/***/ }), - -/***/ 67025: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['workmailmessageflow'] = {}; -AWS.WorkMailMessageFlow = Service.defineService('workmailmessageflow', ['2019-05-01']); -Object.defineProperty(apiLoader.services['workmailmessageflow'], '2019-05-01', { - get: function get() { - var model = __nccwpck_require__(15648); - model.paginators = __nccwpck_require__(88532)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.WorkMailMessageFlow; - - -/***/ }), - -/***/ 25513: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['workspaces'] = {}; -AWS.WorkSpaces = Service.defineService('workspaces', ['2015-04-08']); -Object.defineProperty(apiLoader.services['workspaces'], '2015-04-08', { - get: function get() { - var model = __nccwpck_require__(66372); - model.paginators = __nccwpck_require__(37567)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.WorkSpaces; - - -/***/ }), - -/***/ 94124: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['workspacesweb'] = {}; -AWS.WorkSpacesWeb = Service.defineService('workspacesweb', ['2020-07-08']); -Object.defineProperty(apiLoader.services['workspacesweb'], '2020-07-08', { - get: function get() { - var model = __nccwpck_require__(53596); - model.paginators = __nccwpck_require__(61133)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.WorkSpacesWeb; - - -/***/ }), - -/***/ 41548: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); -var AWS = __nccwpck_require__(28437); -var Service = AWS.Service; -var apiLoader = AWS.apiLoader; - -apiLoader.services['xray'] = {}; -AWS.XRay = Service.defineService('xray', ['2016-04-12']); -Object.defineProperty(apiLoader.services['xray'], '2016-04-12', { - get: function get() { - var model = __nccwpck_require__(37289); - model.paginators = __nccwpck_require__(83127)/* .pagination */ .o; - return model; - }, - enumerable: true, - configurable: true -}); - -module.exports = AWS.XRay; - - -/***/ }), - -/***/ 52793: -/***/ ((module) => { - -function apiLoader(svc, version) { - if (!apiLoader.services.hasOwnProperty(svc)) { - throw new Error('InvalidService: Failed to load api for ' + svc); - } - return apiLoader.services[svc][version]; -} - -/** - * @api private - * - * This member of AWS.apiLoader is private, but changing it will necessitate a - * change to ../scripts/services-table-generator.ts - */ -apiLoader.services = {}; - -/** - * @api private - */ -module.exports = apiLoader; - - -/***/ }), - -/***/ 71786: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(73639); - -var AWS = __nccwpck_require__(28437); - -// Load all service classes -__nccwpck_require__(26296); - -/** - * @api private - */ -module.exports = AWS; - - -/***/ }), - -/***/ 93260: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437), - url = AWS.util.url, - crypto = AWS.util.crypto.lib, - base64Encode = AWS.util.base64.encode, - inherit = AWS.util.inherit; - -var queryEncode = function (string) { - var replacements = { - '+': '-', - '=': '_', - '/': '~' - }; - return string.replace(/[\+=\/]/g, function (match) { - return replacements[match]; - }); -}; - -var signPolicy = function (policy, privateKey) { - var sign = crypto.createSign('RSA-SHA1'); - sign.write(policy); - return queryEncode(sign.sign(privateKey, 'base64')); -}; - -var signWithCannedPolicy = function (url, expires, keyPairId, privateKey) { - var policy = JSON.stringify({ - Statement: [ - { - Resource: url, - Condition: { DateLessThan: { 'AWS:EpochTime': expires } } - } - ] - }); - - return { - Expires: expires, - 'Key-Pair-Id': keyPairId, - Signature: signPolicy(policy.toString(), privateKey) - }; -}; - -var signWithCustomPolicy = function (policy, keyPairId, privateKey) { - policy = policy.replace(/\s/mg, ''); - - return { - Policy: queryEncode(base64Encode(policy)), - 'Key-Pair-Id': keyPairId, - Signature: signPolicy(policy, privateKey) - }; -}; - -var determineScheme = function (url) { - var parts = url.split('://'); - if (parts.length < 2) { - throw new Error('Invalid URL.'); - } - - return parts[0].replace('*', ''); -}; - -var getRtmpUrl = function (rtmpUrl) { - var parsed = url.parse(rtmpUrl); - return parsed.path.replace(/^\//, '') + (parsed.hash || ''); -}; - -var getResource = function (url) { - switch (determineScheme(url)) { - case 'http': - case 'https': - return url; - case 'rtmp': - return getRtmpUrl(url); - default: - throw new Error('Invalid URI scheme. Scheme must be one of' - + ' http, https, or rtmp'); - } -}; - -var handleError = function (err, callback) { - if (!callback || typeof callback !== 'function') { - throw err; - } - - callback(err); -}; - -var handleSuccess = function (result, callback) { - if (!callback || typeof callback !== 'function') { - return result; - } - - callback(null, result); -}; - -AWS.CloudFront.Signer = inherit({ - /** - * A signer object can be used to generate signed URLs and cookies for granting - * access to content on restricted CloudFront distributions. - * - * @see http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html - * - * @param keyPairId [String] (Required) The ID of the CloudFront key pair - * being used. - * @param privateKey [String] (Required) A private key in RSA format. - */ - constructor: function Signer(keyPairId, privateKey) { - if (keyPairId === void 0 || privateKey === void 0) { - throw new Error('A key pair ID and private key are required'); +/***/ 6087: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ECRPUBLIC = void 0; +const BatchCheckLayerAvailabilityCommand_1 = __nccwpck_require__(9464); +const BatchDeleteImageCommand_1 = __nccwpck_require__(6517); +const CompleteLayerUploadCommand_1 = __nccwpck_require__(5490); +const CreateRepositoryCommand_1 = __nccwpck_require__(9633); +const DeleteRepositoryCommand_1 = __nccwpck_require__(467); +const DeleteRepositoryPolicyCommand_1 = __nccwpck_require__(2528); +const DescribeImagesCommand_1 = __nccwpck_require__(2776); +const DescribeImageTagsCommand_1 = __nccwpck_require__(7670); +const DescribeRegistriesCommand_1 = __nccwpck_require__(8696); +const DescribeRepositoriesCommand_1 = __nccwpck_require__(2218); +const GetAuthorizationTokenCommand_1 = __nccwpck_require__(2674); +const GetRegistryCatalogDataCommand_1 = __nccwpck_require__(6518); +const GetRepositoryCatalogDataCommand_1 = __nccwpck_require__(3189); +const GetRepositoryPolicyCommand_1 = __nccwpck_require__(8562); +const InitiateLayerUploadCommand_1 = __nccwpck_require__(3675); +const ListTagsForResourceCommand_1 = __nccwpck_require__(575); +const PutImageCommand_1 = __nccwpck_require__(6486); +const PutRegistryCatalogDataCommand_1 = __nccwpck_require__(6805); +const PutRepositoryCatalogDataCommand_1 = __nccwpck_require__(3753); +const SetRepositoryPolicyCommand_1 = __nccwpck_require__(1796); +const TagResourceCommand_1 = __nccwpck_require__(9869); +const UntagResourceCommand_1 = __nccwpck_require__(6689); +const UploadLayerPartCommand_1 = __nccwpck_require__(7429); +const ECRPUBLICClient_1 = __nccwpck_require__(608); +class ECRPUBLIC extends ECRPUBLICClient_1.ECRPUBLICClient { + batchCheckLayerAvailability(args, optionsOrCb, cb) { + const command = new BatchCheckLayerAvailabilityCommand_1.BatchCheckLayerAvailabilityCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); } - - this.keyPairId = keyPairId; - this.privateKey = privateKey; - }, - - /** - * Create a signed Amazon CloudFront Cookie. - * - * @param options [Object] The options to create a signed cookie. - * @option options url [String] The URL to which the signature will grant - * access. Required unless you pass in a full - * policy. - * @option options expires [Number] A Unix UTC timestamp indicating when the - * signature should expire. Required unless you - * pass in a full policy. - * @option options policy [String] A CloudFront JSON policy. Required unless - * you pass in a url and an expiry time. - * - * @param cb [Function] if a callback is provided, this function will - * pass the hash as the second parameter (after the error parameter) to - * the callback function. - * - * @return [Object] if called synchronously (with no callback), returns the - * signed cookie parameters. - * @return [null] nothing is returned if a callback is provided. - */ - getSignedCookie: function (options, cb) { - var signatureHash = 'policy' in options - ? signWithCustomPolicy(options.policy, this.keyPairId, this.privateKey) - : signWithCannedPolicy(options.url, options.expires, this.keyPairId, this.privateKey); - - var cookieHash = {}; - for (var key in signatureHash) { - if (Object.prototype.hasOwnProperty.call(signatureHash, key)) { - cookieHash['CloudFront-' + key] = signatureHash[key]; - } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); } - - return handleSuccess(cookieHash, cb); - }, - - /** - * Create a signed Amazon CloudFront URL. - * - * Keep in mind that URLs meant for use in media/flash players may have - * different requirements for URL formats (e.g. some require that the - * extension be removed, some require the file name to be prefixed - * - mp4:, some require you to add "/cfx/st" into your URL). - * - * @param options [Object] The options to create a signed URL. - * @option options url [String] The URL to which the signature will grant - * access. Any query params included with - * the URL should be encoded. Required. - * @option options expires [Number] A Unix UTC timestamp indicating when the - * signature should expire. Required unless you - * pass in a full policy. - * @option options policy [String] A CloudFront JSON policy. Required unless - * you pass in a url and an expiry time. - * - * @param cb [Function] if a callback is provided, this function will - * pass the URL as the second parameter (after the error parameter) to - * the callback function. - * - * @return [String] if called synchronously (with no callback), returns the - * signed URL. - * @return [null] nothing is returned if a callback is provided. - */ - getSignedUrl: function (options, cb) { - try { - var resource = getResource(options.url); - } catch (err) { - return handleError(err, cb); - } - - var parsedUrl = url.parse(options.url, true), - signatureHash = Object.prototype.hasOwnProperty.call(options, 'policy') - ? signWithCustomPolicy(options.policy, this.keyPairId, this.privateKey) - : signWithCannedPolicy(resource, options.expires, this.keyPairId, this.privateKey); - - parsedUrl.search = null; - for (var key in signatureHash) { - if (Object.prototype.hasOwnProperty.call(signatureHash, key)) { - parsedUrl.query[key] = signatureHash[key]; - } - } - - try { - var signedUrl = determineScheme(options.url) === 'rtmp' - ? getRtmpUrl(url.format(parsedUrl)) - : url.format(parsedUrl); - } catch (err) { - return handleError(err, cb); - } - - return handleSuccess(signedUrl, cb); - } -}); - -/** - * @api private - */ -module.exports = AWS.CloudFront.Signer; - - -/***/ }), - -/***/ 38110: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -__nccwpck_require__(53819); -__nccwpck_require__(36965); -var PromisesDependency; - -/** - * The main configuration class used by all service objects to set - * the region, credentials, and other options for requests. - * - * By default, credentials and region settings are left unconfigured. - * This should be configured by the application before using any - * AWS service APIs. - * - * In order to set global configuration options, properties should - * be assigned to the global {AWS.config} object. - * - * @see AWS.config - * - * @!group General Configuration Options - * - * @!attribute credentials - * @return [AWS.Credentials] the AWS credentials to sign requests with. - * - * @!attribute region - * @example Set the global region setting to us-west-2 - * AWS.config.update({region: 'us-west-2'}); - * @return [AWS.Credentials] The region to send service requests to. - * @see http://docs.amazonwebservices.com/general/latest/gr/rande.html - * A list of available endpoints for each AWS service - * - * @!attribute maxRetries - * @return [Integer] the maximum amount of retries to perform for a - * service request. By default this value is calculated by the specific - * service object that the request is being made to. - * - * @!attribute maxRedirects - * @return [Integer] the maximum amount of redirects to follow for a - * service request. Defaults to 10. - * - * @!attribute paramValidation - * @return [Boolean|map] whether input parameters should be validated against - * the operation description before sending the request. Defaults to true. - * Pass a map to enable any of the following specific validation features: - * - * * **min** [Boolean] — Validates that a value meets the min - * constraint. This is enabled by default when paramValidation is set - * to `true`. - * * **max** [Boolean] — Validates that a value meets the max - * constraint. - * * **pattern** [Boolean] — Validates that a string value matches a - * regular expression. - * * **enum** [Boolean] — Validates that a string value matches one - * of the allowable enum values. - * - * @!attribute computeChecksums - * @return [Boolean] whether to compute checksums for payload bodies when - * the service accepts it (currently supported in S3 and SQS only). - * - * @!attribute convertResponseTypes - * @return [Boolean] whether types are converted when parsing response data. - * Currently only supported for JSON based services. Turning this off may - * improve performance on large response payloads. Defaults to `true`. - * - * @!attribute correctClockSkew - * @return [Boolean] whether to apply a clock skew correction and retry - * requests that fail because of an skewed client clock. Defaults to - * `false`. - * - * @!attribute sslEnabled - * @return [Boolean] whether SSL is enabled for requests - * - * @!attribute s3ForcePathStyle - * @return [Boolean] whether to force path style URLs for S3 objects - * - * @!attribute s3BucketEndpoint - * @note Setting this configuration option requires an `endpoint` to be - * provided explicitly to the service constructor. - * @return [Boolean] whether the provided endpoint addresses an individual - * bucket (false if it addresses the root API endpoint). - * - * @!attribute s3DisableBodySigning - * @return [Boolean] whether to disable S3 body signing when using signature version `v4`. - * Body signing can only be disabled when using https. Defaults to `true`. - * - * @!attribute s3UsEast1RegionalEndpoint - * @return ['legacy'|'regional'] when region is set to 'us-east-1', whether to send s3 - * request to global endpoints or 'us-east-1' regional endpoints. This config is only - * applicable to S3 client; - * Defaults to 'legacy' - * @!attribute s3UseArnRegion - * @return [Boolean] whether to override the request region with the region inferred - * from requested resource's ARN. Only available for S3 buckets - * Defaults to `true` - * - * @!attribute useAccelerateEndpoint - * @note This configuration option is only compatible with S3 while accessing - * dns-compatible buckets. - * @return [Boolean] Whether to use the Accelerate endpoint with the S3 service. - * Defaults to `false`. - * - * @!attribute retryDelayOptions - * @example Set the base retry delay for all services to 300 ms - * AWS.config.update({retryDelayOptions: {base: 300}}); - * // Delays with maxRetries = 3: 300, 600, 1200 - * @example Set a custom backoff function to provide delay values on retries - * AWS.config.update({retryDelayOptions: {customBackoff: function(retryCount, err) { - * // returns delay in ms - * }}}); - * @return [map] A set of options to configure the retry delay on retryable errors. - * Currently supported options are: - * - * * **base** [Integer] — The base number of milliseconds to use in the - * exponential backoff for operation retries. Defaults to 100 ms for all services except - * DynamoDB, where it defaults to 50ms. - * - * * **customBackoff ** [function] — A custom function that accepts a - * retry count and error and returns the amount of time to delay in - * milliseconds. If the result is a non-zero negative value, no further - * retry attempts will be made. The `base` option will be ignored if this - * option is supplied. The function is only called for retryable errors. - * - * @!attribute httpOptions - * @return [map] A set of options to pass to the low-level HTTP request. - * Currently supported options are: - * - * * **proxy** [String] — the URL to proxy requests through - * * **agent** [http.Agent, https.Agent] — the Agent object to perform - * HTTP requests with. Used for connection pooling. Note that for - * SSL connections, a special Agent object is used in order to enable - * peer certificate verification. This feature is only supported in the - * Node.js environment. - * * **connectTimeout** [Integer] — Sets the socket to timeout after - * failing to establish a connection with the server after - * `connectTimeout` milliseconds. This timeout has no effect once a socket - * connection has been established. - * * **timeout** [Integer] — The number of milliseconds a request can - * take before automatically being terminated. - * Defaults to two minutes (120000). - * * **xhrAsync** [Boolean] — Whether the SDK will send asynchronous - * HTTP requests. Used in the browser environment only. Set to false to - * send requests synchronously. Defaults to true (async on). - * * **xhrWithCredentials** [Boolean] — Sets the "withCredentials" - * property of an XMLHttpRequest object. Used in the browser environment - * only. Defaults to false. - * @!attribute logger - * @return [#write,#log] an object that responds to .write() (like a stream) - * or .log() (like the console object) in order to log information about - * requests - * - * @!attribute systemClockOffset - * @return [Number] an offset value in milliseconds to apply to all signing - * times. Use this to compensate for clock skew when your system may be - * out of sync with the service time. Note that this configuration option - * can only be applied to the global `AWS.config` object and cannot be - * overridden in service-specific configuration. Defaults to 0 milliseconds. - * - * @!attribute signatureVersion - * @return [String] the signature version to sign requests with (overriding - * the API configuration). Possible values are: 'v2', 'v3', 'v4'. - * - * @!attribute signatureCache - * @return [Boolean] whether the signature to sign requests with (overriding - * the API configuration) is cached. Only applies to the signature version 'v4'. - * Defaults to `true`. - * - * @!attribute endpointDiscoveryEnabled - * @return [Boolean|undefined] whether to call operations with endpoints - * given by service dynamically. Setting this config to `true` will enable - * endpoint discovery for all applicable operations. Setting it to `false` - * will explicitly disable endpoint discovery even though operations that - * require endpoint discovery will presumably fail. Leaving it to - * `undefined` means SDK only do endpoint discovery when it's required. - * Defaults to `undefined` - * - * @!attribute endpointCacheSize - * @return [Number] the size of the global cache storing endpoints from endpoint - * discovery operations. Once endpoint cache is created, updating this setting - * cannot change existing cache size. - * Defaults to 1000 - * - * @!attribute hostPrefixEnabled - * @return [Boolean] whether to marshal request parameters to the prefix of - * hostname. Defaults to `true`. - * - * @!attribute stsRegionalEndpoints - * @return ['legacy'|'regional'] whether to send sts request to global endpoints or - * regional endpoints. - * Defaults to 'legacy'. - * - * @!attribute useFipsEndpoint - * @return [Boolean] Enables FIPS compatible endpoints. Defaults to `false`. - * - * @!attribute useDualstackEndpoint - * @return [Boolean] Enables IPv6 dualstack endpoint. Defaults to `false`. - */ -AWS.Config = AWS.util.inherit({ - /** - * @!endgroup - */ - - /** - * Creates a new configuration object. This is the object that passes - * option data along to service requests, including credentials, security, - * region information, and some service specific settings. - * - * @example Creating a new configuration object with credentials and region - * var config = new AWS.Config({ - * accessKeyId: 'AKID', secretAccessKey: 'SECRET', region: 'us-west-2' - * }); - * @option options accessKeyId [String] your AWS access key ID. - * @option options secretAccessKey [String] your AWS secret access key. - * @option options sessionToken [AWS.Credentials] the optional AWS - * session token to sign requests with. - * @option options credentials [AWS.Credentials] the AWS credentials - * to sign requests with. You can either specify this object, or - * specify the accessKeyId and secretAccessKey options directly. - * @option options credentialProvider [AWS.CredentialProviderChain] the - * provider chain used to resolve credentials if no static `credentials` - * property is set. - * @option options region [String] the region to send service requests to. - * See {region} for more information. - * @option options maxRetries [Integer] the maximum amount of retries to - * attempt with a request. See {maxRetries} for more information. - * @option options maxRedirects [Integer] the maximum amount of redirects to - * follow with a request. See {maxRedirects} for more information. - * @option options sslEnabled [Boolean] whether to enable SSL for - * requests. - * @option options paramValidation [Boolean|map] whether input parameters - * should be validated against the operation description before sending - * the request. Defaults to true. Pass a map to enable any of the - * following specific validation features: - * - * * **min** [Boolean] — Validates that a value meets the min - * constraint. This is enabled by default when paramValidation is set - * to `true`. - * * **max** [Boolean] — Validates that a value meets the max - * constraint. - * * **pattern** [Boolean] — Validates that a string value matches a - * regular expression. - * * **enum** [Boolean] — Validates that a string value matches one - * of the allowable enum values. - * @option options computeChecksums [Boolean] whether to compute checksums - * for payload bodies when the service accepts it (currently supported - * in S3 only) - * @option options convertResponseTypes [Boolean] whether types are converted - * when parsing response data. Currently only supported for JSON based - * services. Turning this off may improve performance on large response - * payloads. Defaults to `true`. - * @option options correctClockSkew [Boolean] whether to apply a clock skew - * correction and retry requests that fail because of an skewed client - * clock. Defaults to `false`. - * @option options s3ForcePathStyle [Boolean] whether to force path - * style URLs for S3 objects. - * @option options s3BucketEndpoint [Boolean] whether the provided endpoint - * addresses an individual bucket (false if it addresses the root API - * endpoint). Note that setting this configuration option requires an - * `endpoint` to be provided explicitly to the service constructor. - * @option options s3DisableBodySigning [Boolean] whether S3 body signing - * should be disabled when using signature version `v4`. Body signing - * can only be disabled when using https. Defaults to `true`. - * @option options s3UsEast1RegionalEndpoint ['legacy'|'regional'] when region - * is set to 'us-east-1', whether to send s3 request to global endpoints or - * 'us-east-1' regional endpoints. This config is only applicable to S3 client. - * Defaults to `legacy` - * @option options s3UseArnRegion [Boolean] whether to override the request region - * with the region inferred from requested resource's ARN. Only available for S3 buckets - * Defaults to `true` - * - * @option options retryDelayOptions [map] A set of options to configure - * the retry delay on retryable errors. Currently supported options are: - * - * * **base** [Integer] — The base number of milliseconds to use in the - * exponential backoff for operation retries. Defaults to 100 ms for all - * services except DynamoDB, where it defaults to 50ms. - * * **customBackoff ** [function] — A custom function that accepts a - * retry count and error and returns the amount of time to delay in - * milliseconds. If the result is a non-zero negative value, no further - * retry attempts will be made. The `base` option will be ignored if this - * option is supplied. The function is only called for retryable errors. - * @option options httpOptions [map] A set of options to pass to the low-level - * HTTP request. Currently supported options are: - * - * * **proxy** [String] — the URL to proxy requests through - * * **agent** [http.Agent, https.Agent] — the Agent object to perform - * HTTP requests with. Used for connection pooling. Defaults to the global - * agent (`http.globalAgent`) for non-SSL connections. Note that for - * SSL connections, a special Agent object is used in order to enable - * peer certificate verification. This feature is only available in the - * Node.js environment. - * * **connectTimeout** [Integer] — Sets the socket to timeout after - * failing to establish a connection with the server after - * `connectTimeout` milliseconds. This timeout has no effect once a socket - * connection has been established. - * * **timeout** [Integer] — Sets the socket to timeout after timeout - * milliseconds of inactivity on the socket. Defaults to two minutes - * (120000). - * * **xhrAsync** [Boolean] — Whether the SDK will send asynchronous - * HTTP requests. Used in the browser environment only. Set to false to - * send requests synchronously. Defaults to true (async on). - * * **xhrWithCredentials** [Boolean] — Sets the "withCredentials" - * property of an XMLHttpRequest object. Used in the browser environment - * only. Defaults to false. - * @option options apiVersion [String, Date] a String in YYYY-MM-DD format - * (or a date) that represents the latest possible API version that can be - * used in all services (unless overridden by `apiVersions`). Specify - * 'latest' to use the latest possible version. - * @option options apiVersions [map] a map of service - * identifiers (the lowercase service class name) with the API version to - * use when instantiating a service. Specify 'latest' for each individual - * that can use the latest available version. - * @option options logger [#write,#log] an object that responds to .write() - * (like a stream) or .log() (like the console object) in order to log - * information about requests - * @option options systemClockOffset [Number] an offset value in milliseconds - * to apply to all signing times. Use this to compensate for clock skew - * when your system may be out of sync with the service time. Note that - * this configuration option can only be applied to the global `AWS.config` - * object and cannot be overridden in service-specific configuration. - * Defaults to 0 milliseconds. - * @option options signatureVersion [String] the signature version to sign - * requests with (overriding the API configuration). Possible values are: - * 'v2', 'v3', 'v4'. - * @option options signatureCache [Boolean] whether the signature to sign - * requests with (overriding the API configuration) is cached. Only applies - * to the signature version 'v4'. Defaults to `true`. - * @option options dynamoDbCrc32 [Boolean] whether to validate the CRC32 - * checksum of HTTP response bodies returned by DynamoDB. Default: `true`. - * @option options useAccelerateEndpoint [Boolean] Whether to use the - * S3 Transfer Acceleration endpoint with the S3 service. Default: `false`. - * @option options clientSideMonitoring [Boolean] whether to collect and - * publish this client's performance metrics of all its API requests. - * @option options endpointDiscoveryEnabled [Boolean|undefined] whether to - * call operations with endpoints given by service dynamically. Setting this - * config to `true` will enable endpoint discovery for all applicable operations. - * Setting it to `false` will explicitly disable endpoint discovery even though - * operations that require endpoint discovery will presumably fail. Leaving it - * to `undefined` means SDK will only do endpoint discovery when it's required. - * Defaults to `undefined` - * @option options endpointCacheSize [Number] the size of the global cache storing - * endpoints from endpoint discovery operations. Once endpoint cache is created, - * updating this setting cannot change existing cache size. - * Defaults to 1000 - * @option options hostPrefixEnabled [Boolean] whether to marshal request - * parameters to the prefix of hostname. - * Defaults to `true`. - * @option options stsRegionalEndpoints ['legacy'|'regional'] whether to send sts request - * to global endpoints or regional endpoints. - * Defaults to 'legacy'. - * @option options useFipsEndpoint [Boolean] Enables FIPS compatible endpoints. - * Defaults to `false`. - * @option options useDualstackEndpoint [Boolean] Enables IPv6 dualstack endpoint. - * Defaults to `false`. - */ - constructor: function Config(options) { - if (options === undefined) options = {}; - options = this.extractCredentials(options); - - AWS.util.each.call(this, this.keys, function (key, value) { - this.set(key, options[key], value); - }); - }, - - /** - * @!group Managing Credentials - */ - - /** - * Loads credentials from the configuration object. This is used internally - * by the SDK to ensure that refreshable {Credentials} objects are properly - * refreshed and loaded when sending a request. If you want to ensure that - * your credentials are loaded prior to a request, you can use this method - * directly to provide accurate credential data stored in the object. - * - * @note If you configure the SDK with static or environment credentials, - * the credential data should already be present in {credentials} attribute. - * This method is primarily necessary to load credentials from asynchronous - * sources, or sources that can refresh credentials periodically. - * @example Getting your access key - * AWS.config.getCredentials(function(err) { - * if (err) console.log(err.stack); // credentials not loaded - * else console.log("Access Key:", AWS.config.credentials.accessKeyId); - * }) - * @callback callback function(err) - * Called when the {credentials} have been properly set on the configuration - * object. - * - * @param err [Error] if this is set, credentials were not successfully - * loaded and this error provides information why. - * @see credentials - * @see Credentials - */ - getCredentials: function getCredentials(callback) { - var self = this; - - function finish(err) { - callback(err, err ? null : self.credentials); - } - - function credError(msg, err) { - return new AWS.util.error(err || new Error(), { - code: 'CredentialsError', - message: msg, - name: 'CredentialsError' - }); - } - - function getAsyncCredentials() { - self.credentials.get(function(err) { - if (err) { - var msg = 'Could not load credentials from ' + - self.credentials.constructor.name; - err = credError(msg, err); - } - finish(err); - }); - } - - function getStaticCredentials() { - var err = null; - if (!self.credentials.accessKeyId || !self.credentials.secretAccessKey) { - err = credError('Missing credentials'); - } - finish(err); - } - - if (self.credentials) { - if (typeof self.credentials.get === 'function') { - getAsyncCredentials(); - } else { // static credentials - getStaticCredentials(); - } - } else if (self.credentialProvider) { - self.credentialProvider.resolve(function(err, creds) { - if (err) { - err = credError('Could not load credentials from any providers', err); - } - self.credentials = creds; - finish(err); - }); - } else { - finish(credError('No credentials to load')); - } - }, - - /** - * @!group Loading and Setting Configuration Options - */ - - /** - * @overload update(options, allowUnknownKeys = false) - * Updates the current configuration object with new options. - * - * @example Update maxRetries property of a configuration object - * config.update({maxRetries: 10}); - * @param [Object] options a map of option keys and values. - * @param [Boolean] allowUnknownKeys whether unknown keys can be set on - * the configuration object. Defaults to `false`. - * @see constructor - */ - update: function update(options, allowUnknownKeys) { - allowUnknownKeys = allowUnknownKeys || false; - options = this.extractCredentials(options); - AWS.util.each.call(this, options, function (key, value) { - if (allowUnknownKeys || Object.prototype.hasOwnProperty.call(this.keys, key) || - AWS.Service.hasService(key)) { - this.set(key, value); - } - }); - }, - - /** - * Loads configuration data from a JSON file into this config object. - * @note Loading configuration will reset all existing configuration - * on the object. - * @!macro nobrowser - * @param path [String] the path relative to your process's current - * working directory to load configuration from. - * @return [AWS.Config] the same configuration object - */ - loadFromPath: function loadFromPath(path) { - this.clear(); - - var options = JSON.parse(AWS.util.readFileSync(path)); - var fileSystemCreds = new AWS.FileSystemCredentials(path); - var chain = new AWS.CredentialProviderChain(); - chain.providers.unshift(fileSystemCreds); - chain.resolve(function (err, creds) { - if (err) throw err; - else options.credentials = creds; - }); - - this.constructor(options); - - return this; - }, - - /** - * Clears configuration data on this object - * - * @api private - */ - clear: function clear() { - /*jshint forin:false */ - AWS.util.each.call(this, this.keys, function (key) { - delete this[key]; - }); - - // reset credential provider - this.set('credentials', undefined); - this.set('credentialProvider', undefined); - }, - - /** - * Sets a property on the configuration object, allowing for a - * default value - * @api private - */ - set: function set(property, value, defaultValue) { - if (value === undefined) { - if (defaultValue === undefined) { - defaultValue = this.keys[property]; - } - if (typeof defaultValue === 'function') { - this[property] = defaultValue.call(this); - } else { - this[property] = defaultValue; - } - } else if (property === 'httpOptions' && this[property]) { - // deep merge httpOptions - this[property] = AWS.util.merge(this[property], value); - } else { - this[property] = value; - } - }, - - /** - * All of the keys with their default values. - * - * @constant - * @api private - */ - keys: { - credentials: null, - credentialProvider: null, - region: null, - logger: null, - apiVersions: {}, - apiVersion: null, - endpoint: undefined, - httpOptions: { - timeout: 120000 - }, - maxRetries: undefined, - maxRedirects: 10, - paramValidation: true, - sslEnabled: true, - s3ForcePathStyle: false, - s3BucketEndpoint: false, - s3DisableBodySigning: true, - s3UsEast1RegionalEndpoint: 'legacy', - s3UseArnRegion: undefined, - computeChecksums: true, - convertResponseTypes: true, - correctClockSkew: false, - customUserAgent: null, - dynamoDbCrc32: true, - systemClockOffset: 0, - signatureVersion: null, - signatureCache: true, - retryDelayOptions: {}, - useAccelerateEndpoint: false, - clientSideMonitoring: false, - endpointDiscoveryEnabled: undefined, - endpointCacheSize: 1000, - hostPrefixEnabled: true, - stsRegionalEndpoints: 'legacy', - useFipsEndpoint: false, - useDualstackEndpoint: false - }, - - /** - * Extracts accessKeyId, secretAccessKey and sessionToken - * from a configuration hash. - * - * @api private - */ - extractCredentials: function extractCredentials(options) { - if (options.accessKeyId && options.secretAccessKey) { - options = AWS.util.copy(options); - options.credentials = new AWS.Credentials(options); - } - return options; - }, - - /** - * Sets the promise dependency the SDK will use wherever Promises are returned. - * Passing `null` will force the SDK to use native Promises if they are available. - * If native Promises are not available, passing `null` will have no effect. - * @param [Constructor] dep A reference to a Promise constructor - */ - setPromisesDependency: function setPromisesDependency(dep) { - PromisesDependency = dep; - // if null was passed in, we should try to use native promises - if (dep === null && typeof Promise === 'function') { - PromisesDependency = Promise; - } - var constructors = [AWS.Request, AWS.Credentials, AWS.CredentialProviderChain]; - if (AWS.S3) { - constructors.push(AWS.S3); - if (AWS.S3.ManagedUpload) { - constructors.push(AWS.S3.ManagedUpload); - } - } - AWS.util.addPromises(constructors, PromisesDependency); - }, - - /** - * Gets the promise dependency set by `AWS.config.setPromisesDependency`. - */ - getPromisesDependency: function getPromisesDependency() { - return PromisesDependency; - } -}); - -/** - * @return [AWS.Config] The global configuration object singleton instance - * @readonly - * @see AWS.Config - */ -AWS.config = new AWS.Config(); - - -/***/ }), - -/***/ 85566: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -/** - * @api private - */ -function validateRegionalEndpointsFlagValue(configValue, errorOptions) { - if (typeof configValue !== 'string') return undefined; - else if (['legacy', 'regional'].indexOf(configValue.toLowerCase()) >= 0) { - return configValue.toLowerCase(); - } else { - throw AWS.util.error(new Error(), errorOptions); - } -} - -/** - * Resolve the configuration value for regional endpoint from difference sources: client - * config, environmental variable, shared config file. Value can be case-insensitive - * 'legacy' or 'reginal'. - * @param originalConfig user-supplied config object to resolve - * @param options a map of config property names from individual configuration source - * - env: name of environmental variable that refers to the config - * - sharedConfig: name of shared configuration file property that refers to the config - * - clientConfig: name of client configuration property that refers to the config - * - * @api private - */ -function resolveRegionalEndpointsFlag(originalConfig, options) { - originalConfig = originalConfig || {}; - //validate config value - var resolved; - if (originalConfig[options.clientConfig]) { - resolved = validateRegionalEndpointsFlagValue(originalConfig[options.clientConfig], { - code: 'InvalidConfiguration', - message: 'invalid "' + options.clientConfig + '" configuration. Expect "legacy" ' + - ' or "regional". Got "' + originalConfig[options.clientConfig] + '".' - }); - if (resolved) return resolved; - } - if (!AWS.util.isNode()) return resolved; - //validate environmental variable - if (Object.prototype.hasOwnProperty.call(process.env, options.env)) { - var envFlag = process.env[options.env]; - resolved = validateRegionalEndpointsFlagValue(envFlag, { - code: 'InvalidEnvironmentalVariable', - message: 'invalid ' + options.env + ' environmental variable. Expect "legacy" ' + - ' or "regional". Got "' + process.env[options.env] + '".' - }); - if (resolved) return resolved; - } - //validate shared config file - var profile = {}; - try { - var profiles = AWS.util.getProfilesFromSharedConfig(AWS.util.iniLoader); - profile = profiles[process.env.AWS_PROFILE || AWS.util.defaultProfile]; - } catch (e) {}; - if (profile && Object.prototype.hasOwnProperty.call(profile, options.sharedConfig)) { - var fileFlag = profile[options.sharedConfig]; - resolved = validateRegionalEndpointsFlagValue(fileFlag, { - code: 'InvalidConfiguration', - message: 'invalid ' + options.sharedConfig + ' profile config. Expect "legacy" ' + - ' or "regional". Got "' + profile[options.sharedConfig] + '".' - }); - if (resolved) return resolved; - } - return resolved; -} - -module.exports = resolveRegionalEndpointsFlag; - - -/***/ }), - -/***/ 28437: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/** - * The main AWS namespace - */ -var AWS = { util: __nccwpck_require__(77985) }; - -/** - * @api private - * @!macro [new] nobrowser - * @note This feature is not supported in the browser environment of the SDK. - */ -var _hidden = {}; _hidden.toString(); // hack to parse macro - -/** - * @api private - */ -module.exports = AWS; - -AWS.util.update(AWS, { - - /** - * @constant - */ - VERSION: '2.1046.0', - - /** - * @api private - */ - Signers: {}, - - /** - * @api private - */ - Protocol: { - Json: __nccwpck_require__(30083), - Query: __nccwpck_require__(90761), - Rest: __nccwpck_require__(98200), - RestJson: __nccwpck_require__(5883), - RestXml: __nccwpck_require__(15143) - }, - - /** - * @api private - */ - XML: { - Builder: __nccwpck_require__(23546), - Parser: null // conditionally set based on environment - }, - - /** - * @api private - */ - JSON: { - Builder: __nccwpck_require__(47495), - Parser: __nccwpck_require__(5474) - }, - - /** - * @api private - */ - Model: { - Api: __nccwpck_require__(17657), - Operation: __nccwpck_require__(28083), - Shape: __nccwpck_require__(71349), - Paginator: __nccwpck_require__(45938), - ResourceWaiter: __nccwpck_require__(41368) - }, - - /** - * @api private - */ - apiLoader: __nccwpck_require__(52793), - - /** - * @api private - */ - EndpointCache: __nccwpck_require__(96323)/* .EndpointCache */ .$ -}); -__nccwpck_require__(55948); -__nccwpck_require__(68903); -__nccwpck_require__(38110); -__nccwpck_require__(1556); -__nccwpck_require__(54995); -__nccwpck_require__(78652); -__nccwpck_require__(58743); -__nccwpck_require__(7246); -__nccwpck_require__(9897); -__nccwpck_require__(99127); - -/** - * @readonly - * @return [AWS.SequentialExecutor] a collection of global event listeners that - * are attached to every sent request. - * @see AWS.Request AWS.Request for a list of events to listen for - * @example Logging the time taken to send a request - * AWS.events.on('send', function startSend(resp) { - * resp.startTime = new Date().getTime(); - * }).on('complete', function calculateTime(resp) { - * var time = (new Date().getTime() - resp.startTime) / 1000; - * console.log('Request took ' + time + ' seconds'); - * }); - * - * new AWS.S3().listBuckets(); // prints 'Request took 0.285 seconds' - */ -AWS.events = new AWS.SequentialExecutor(); - -//create endpoint cache lazily -AWS.util.memoizedProperty(AWS, 'endpointCache', function() { - return new AWS.EndpointCache(AWS.config.endpointCacheSize); -}, true); - - -/***/ }), - -/***/ 53819: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -/** - * Represents your AWS security credentials, specifically the - * {accessKeyId}, {secretAccessKey}, and optional {sessionToken}. - * Creating a `Credentials` object allows you to pass around your - * security information to configuration and service objects. - * - * Note that this class typically does not need to be constructed manually, - * as the {AWS.Config} and {AWS.Service} classes both accept simple - * options hashes with the three keys. These structures will be converted - * into Credentials objects automatically. - * - * ## Expiring and Refreshing Credentials - * - * Occasionally credentials can expire in the middle of a long-running - * application. In this case, the SDK will automatically attempt to - * refresh the credentials from the storage location if the Credentials - * class implements the {refresh} method. - * - * If you are implementing a credential storage location, you - * will want to create a subclass of the `Credentials` class and - * override the {refresh} method. This method allows credentials to be - * retrieved from the backing store, be it a file system, database, or - * some network storage. The method should reset the credential attributes - * on the object. - * - * @!attribute expired - * @return [Boolean] whether the credentials have been expired and - * require a refresh. Used in conjunction with {expireTime}. - * @!attribute expireTime - * @return [Date] a time when credentials should be considered expired. Used - * in conjunction with {expired}. - * @!attribute accessKeyId - * @return [String] the AWS access key ID - * @!attribute secretAccessKey - * @return [String] the AWS secret access key - * @!attribute sessionToken - * @return [String] an optional AWS session token - */ -AWS.Credentials = AWS.util.inherit({ - /** - * A credentials object can be created using positional arguments or an options - * hash. - * - * @overload AWS.Credentials(accessKeyId, secretAccessKey, sessionToken=null) - * Creates a Credentials object with a given set of credential information - * as positional arguments. - * @param accessKeyId [String] the AWS access key ID - * @param secretAccessKey [String] the AWS secret access key - * @param sessionToken [String] the optional AWS session token - * @example Create a credentials object with AWS credentials - * var creds = new AWS.Credentials('akid', 'secret', 'session'); - * @overload AWS.Credentials(options) - * Creates a Credentials object with a given set of credential information - * as an options hash. - * @option options accessKeyId [String] the AWS access key ID - * @option options secretAccessKey [String] the AWS secret access key - * @option options sessionToken [String] the optional AWS session token - * @example Create a credentials object with AWS credentials - * var creds = new AWS.Credentials({ - * accessKeyId: 'akid', secretAccessKey: 'secret', sessionToken: 'session' - * }); - */ - constructor: function Credentials() { - // hide secretAccessKey from being displayed with util.inspect - AWS.util.hideProperties(this, ['secretAccessKey']); - - this.expired = false; - this.expireTime = null; - this.refreshCallbacks = []; - if (arguments.length === 1 && typeof arguments[0] === 'object') { - var creds = arguments[0].credentials || arguments[0]; - this.accessKeyId = creds.accessKeyId; - this.secretAccessKey = creds.secretAccessKey; - this.sessionToken = creds.sessionToken; - } else { - this.accessKeyId = arguments[0]; - this.secretAccessKey = arguments[1]; - this.sessionToken = arguments[2]; - } - }, - - /** - * @return [Integer] the number of seconds before {expireTime} during which - * the credentials will be considered expired. - */ - expiryWindow: 15, - - /** - * @return [Boolean] whether the credentials object should call {refresh} - * @note Subclasses should override this method to provide custom refresh - * logic. - */ - needsRefresh: function needsRefresh() { - var currentTime = AWS.util.date.getDate().getTime(); - var adjustedTime = new Date(currentTime + this.expiryWindow * 1000); - - if (this.expireTime && adjustedTime > this.expireTime) { - return true; - } else { - return this.expired || !this.accessKeyId || !this.secretAccessKey; - } - }, - - /** - * Gets the existing credentials, refreshing them if they are not yet loaded - * or have expired. Users should call this method before using {refresh}, - * as this will not attempt to reload credentials when they are already - * loaded into the object. - * - * @callback callback function(err) - * When this callback is called with no error, it means either credentials - * do not need to be refreshed or refreshed credentials information has - * been loaded into the object (as the `accessKeyId`, `secretAccessKey`, - * and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - */ - get: function get(callback) { - var self = this; - if (this.needsRefresh()) { - this.refresh(function(err) { - if (!err) self.expired = false; // reset expired flag - if (callback) callback(err); - }); - } else if (callback) { - callback(); - } - }, - - /** - * @!method getPromise() - * Returns a 'thenable' promise. - * Gets the existing credentials, refreshing them if they are not yet loaded - * or have expired. Users should call this method before using {refresh}, - * as this will not attempt to reload credentials when they are already - * loaded into the object. - * - * Two callbacks can be provided to the `then` method on the returned promise. - * The first callback will be called if the promise is fulfilled, and the second - * callback will be called if the promise is rejected. - * @callback fulfilledCallback function() - * Called if the promise is fulfilled. When this callback is called, it - * means either credentials do not need to be refreshed or refreshed - * credentials information has been loaded into the object (as the - * `accessKeyId`, `secretAccessKey`, and `sessionToken` properties). - * @callback rejectedCallback function(err) - * Called if the promise is rejected. - * @param err [Error] if an error occurred, this value will be filled - * @return [Promise] A promise that represents the state of the `get` call. - * @example Calling the `getPromise` method. - * var promise = credProvider.getPromise(); - * promise.then(function() { ... }, function(err) { ... }); - */ - - /** - * @!method refreshPromise() - * Returns a 'thenable' promise. - * Refreshes the credentials. Users should call {get} before attempting - * to forcibly refresh credentials. - * - * Two callbacks can be provided to the `then` method on the returned promise. - * The first callback will be called if the promise is fulfilled, and the second - * callback will be called if the promise is rejected. - * @callback fulfilledCallback function() - * Called if the promise is fulfilled. When this callback is called, it - * means refreshed credentials information has been loaded into the object - * (as the `accessKeyId`, `secretAccessKey`, and `sessionToken` properties). - * @callback rejectedCallback function(err) - * Called if the promise is rejected. - * @param err [Error] if an error occurred, this value will be filled - * @return [Promise] A promise that represents the state of the `refresh` call. - * @example Calling the `refreshPromise` method. - * var promise = credProvider.refreshPromise(); - * promise.then(function() { ... }, function(err) { ... }); - */ - - /** - * Refreshes the credentials. Users should call {get} before attempting - * to forcibly refresh credentials. - * - * @callback callback function(err) - * When this callback is called with no error, it means refreshed - * credentials information has been loaded into the object (as the - * `accessKeyId`, `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @note Subclasses should override this class to reset the - * {accessKeyId}, {secretAccessKey} and optional {sessionToken} - * on the credentials object and then call the callback with - * any error information. - * @see get - */ - refresh: function refresh(callback) { - this.expired = false; - callback(); - }, - - /** - * @api private - * @param callback - */ - coalesceRefresh: function coalesceRefresh(callback, sync) { - var self = this; - if (self.refreshCallbacks.push(callback) === 1) { - self.load(function onLoad(err) { - AWS.util.arrayEach(self.refreshCallbacks, function(callback) { - if (sync) { - callback(err); - } else { - // callback could throw, so defer to ensure all callbacks are notified - AWS.util.defer(function () { - callback(err); - }); - } - }); - self.refreshCallbacks.length = 0; - }); - } - }, - - /** - * @api private - * @param callback - */ - load: function load(callback) { - callback(); - } -}); - -/** - * @api private - */ -AWS.Credentials.addPromisesToClass = function addPromisesToClass(PromiseDependency) { - this.prototype.getPromise = AWS.util.promisifyMethod('get', PromiseDependency); - this.prototype.refreshPromise = AWS.util.promisifyMethod('refresh', PromiseDependency); -}; - -/** - * @api private - */ -AWS.Credentials.deletePromisesFromClass = function deletePromisesFromClass() { - delete this.prototype.getPromise; - delete this.prototype.refreshPromise; -}; - -AWS.util.addPromises(AWS.Credentials); - - -/***/ }), - -/***/ 57083: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var STS = __nccwpck_require__(57513); - -/** - * Represents temporary credentials retrieved from {AWS.STS}. Without any - * extra parameters, credentials will be fetched from the - * {AWS.STS.getSessionToken} operation. If an IAM role is provided, the - * {AWS.STS.assumeRole} operation will be used to fetch credentials for the - * role instead. - * - * AWS.ChainableTemporaryCredentials differs from AWS.TemporaryCredentials in - * the way masterCredentials and refreshes are handled. - * AWS.ChainableTemporaryCredentials refreshes expired credentials using the - * masterCredentials passed by the user to support chaining of STS credentials. - * However, AWS.TemporaryCredentials recursively collapses the masterCredentials - * during instantiation, precluding the ability to refresh credentials which - * require intermediate, temporary credentials. - * - * For example, if the application should use RoleA, which must be assumed from - * RoleB, and the environment provides credentials which can assume RoleB, then - * AWS.ChainableTemporaryCredentials must be used to support refreshing the - * temporary credentials for RoleA: - * - * ```javascript - * var roleACreds = new AWS.ChainableTemporaryCredentials({ - * params: {RoleArn: 'RoleA'}, - * masterCredentials: new AWS.ChainableTemporaryCredentials({ - * params: {RoleArn: 'RoleB'}, - * masterCredentials: new AWS.EnvironmentCredentials('AWS') - * }) - * }); - * ``` - * - * If AWS.TemporaryCredentials had been used in the previous example, - * `roleACreds` would fail to refresh because `roleACreds` would - * use the environment credentials for the AssumeRole request. - * - * Another difference is that AWS.ChainableTemporaryCredentials creates the STS - * service instance during instantiation while AWS.TemporaryCredentials creates - * the STS service instance during the first refresh. Creating the service - * instance during instantiation effectively captures the master credentials - * from the global config, so that subsequent changes to the global config do - * not affect the master credentials used to refresh the temporary credentials. - * - * This allows an instance of AWS.ChainableTemporaryCredentials to be assigned - * to AWS.config.credentials: - * - * ```javascript - * var envCreds = new AWS.EnvironmentCredentials('AWS'); - * AWS.config.credentials = envCreds; - * // masterCredentials will be envCreds - * AWS.config.credentials = new AWS.ChainableTemporaryCredentials({ - * params: {RoleArn: '...'} - * }); - * ``` - * - * Similarly, to use the CredentialProviderChain's default providers as the - * master credentials, simply create a new instance of - * AWS.ChainableTemporaryCredentials: - * - * ```javascript - * AWS.config.credentials = new ChainableTemporaryCredentials({ - * params: {RoleArn: '...'} - * }); - * ``` - * - * @!attribute service - * @return [AWS.STS] the STS service instance used to - * get and refresh temporary credentials from AWS STS. - * @note (see constructor) - */ -AWS.ChainableTemporaryCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * Creates a new temporary credentials object. - * - * @param options [map] a set of options - * @option options params [map] ({}) a map of options that are passed to the - * {AWS.STS.assumeRole} or {AWS.STS.getSessionToken} operations. - * If a `RoleArn` parameter is passed in, credentials will be based on the - * IAM role. If a `SerialNumber` parameter is passed in, {tokenCodeFn} must - * also be passed in or an error will be thrown. - * @option options masterCredentials [AWS.Credentials] the master credentials - * used to get and refresh temporary credentials from AWS STS. By default, - * AWS.config.credentials or AWS.config.credentialProvider will be used. - * @option options tokenCodeFn [Function] (null) Function to provide - * `TokenCode`, if `SerialNumber` is provided for profile in {params}. Function - * is called with value of `SerialNumber` and `callback`, and should provide - * the `TokenCode` or an error to the callback in the format - * `callback(err, token)`. - * @example Creating a new credentials object for generic temporary credentials - * AWS.config.credentials = new AWS.ChainableTemporaryCredentials(); - * @example Creating a new credentials object for an IAM role - * AWS.config.credentials = new AWS.ChainableTemporaryCredentials({ - * params: { - * RoleArn: 'arn:aws:iam::1234567890:role/TemporaryCredentials' - * } - * }); - * @see AWS.STS.assumeRole - * @see AWS.STS.getSessionToken - */ - constructor: function ChainableTemporaryCredentials(options) { - AWS.Credentials.call(this); - options = options || {}; - this.errorCode = 'ChainableTemporaryCredentialsProviderFailure'; - this.expired = true; - this.tokenCodeFn = null; - - var params = AWS.util.copy(options.params) || {}; - if (params.RoleArn) { - params.RoleSessionName = params.RoleSessionName || 'temporary-credentials'; - } - if (params.SerialNumber) { - if (!options.tokenCodeFn || (typeof options.tokenCodeFn !== 'function')) { - throw new AWS.util.error( - new Error('tokenCodeFn must be a function when params.SerialNumber is given'), - {code: this.errorCode} - ); - } else { - this.tokenCodeFn = options.tokenCodeFn; - } - } - var config = AWS.util.merge( - { - params: params, - credentials: options.masterCredentials || AWS.config.credentials - }, - options.stsConfig || {} - ); - this.service = new STS(config); - }, - - /** - * Refreshes credentials using {AWS.STS.assumeRole} or - * {AWS.STS.getSessionToken}, depending on whether an IAM role ARN was passed - * to the credentials {constructor}. - * - * @callback callback function(err) - * Called when the STS service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see AWS.Credentials.get - */ - refresh: function refresh(callback) { - this.coalesceRefresh(callback || AWS.util.fn.callback); - }, - - /** - * @api private - * @param callback - */ - load: function load(callback) { - var self = this; - var operation = self.service.config.params.RoleArn ? 'assumeRole' : 'getSessionToken'; - this.getTokenCode(function (err, tokenCode) { - var params = {}; - if (err) { - callback(err); - return; - } - if (tokenCode) { - params.TokenCode = tokenCode; - } - self.service[operation](params, function (err, data) { - if (!err) { - self.service.credentialsFrom(data, self); - } - callback(err); - }); - }); - }, - - /** - * @api private - */ - getTokenCode: function getTokenCode(callback) { - var self = this; - if (this.tokenCodeFn) { - this.tokenCodeFn(this.service.config.params.SerialNumber, function (err, token) { - if (err) { - var message = err; - if (err instanceof Error) { - message = err.message; - } - callback( - AWS.util.error( - new Error('Error fetching MFA token: ' + message), - { code: self.errorCode} - ) - ); - return; - } - callback(null, token); - }); - } else { - callback(null); - } - } -}); - - -/***/ }), - -/***/ 3498: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var CognitoIdentity = __nccwpck_require__(58291); -var STS = __nccwpck_require__(57513); - -/** - * Represents credentials retrieved from STS Web Identity Federation using - * the Amazon Cognito Identity service. - * - * By default this provider gets credentials using the - * {AWS.CognitoIdentity.getCredentialsForIdentity} service operation, which - * requires either an `IdentityId` or an `IdentityPoolId` (Amazon Cognito - * Identity Pool ID), which is used to call {AWS.CognitoIdentity.getId} to - * obtain an `IdentityId`. If the identity or identity pool is not configured in - * the Amazon Cognito Console to use IAM roles with the appropriate permissions, - * then additionally a `RoleArn` is required containing the ARN of the IAM trust - * policy for the Amazon Cognito role that the user will log into. If a `RoleArn` - * is provided, then this provider gets credentials using the - * {AWS.STS.assumeRoleWithWebIdentity} service operation, after first getting an - * Open ID token from {AWS.CognitoIdentity.getOpenIdToken}. - * - * In addition, if this credential provider is used to provide authenticated - * login, the `Logins` map may be set to the tokens provided by the respective - * identity providers. See {constructor} for an example on creating a credentials - * object with proper property values. - * - * ## Refreshing Credentials from Identity Service - * - * In addition to AWS credentials expiring after a given amount of time, the - * login token from the identity provider will also expire. Once this token - * expires, it will not be usable to refresh AWS credentials, and another - * token will be needed. The SDK does not manage refreshing of the token value, - * but this can be done through a "refresh token" supported by most identity - * providers. Consult the documentation for the identity provider for refreshing - * tokens. Once the refreshed token is acquired, you should make sure to update - * this new token in the credentials object's {params} property. The following - * code will update the WebIdentityToken, assuming you have retrieved an updated - * token from the identity provider: - * - * ```javascript - * AWS.config.credentials.params.Logins['graph.facebook.com'] = updatedToken; - * ``` - * - * Future calls to `credentials.refresh()` will now use the new token. - * - * @!attribute params - * @return [map] the map of params passed to - * {AWS.CognitoIdentity.getId}, - * {AWS.CognitoIdentity.getOpenIdToken}, and - * {AWS.STS.assumeRoleWithWebIdentity}. To update the token, set the - * `params.WebIdentityToken` property. - * @!attribute data - * @return [map] the raw data response from the call to - * {AWS.CognitoIdentity.getCredentialsForIdentity}, or - * {AWS.STS.assumeRoleWithWebIdentity}. Use this if you want to get - * access to other properties from the response. - * @!attribute identityId - * @return [String] the Cognito ID returned by the last call to - * {AWS.CognitoIdentity.getOpenIdToken}. This ID represents the actual - * final resolved identity ID from Amazon Cognito. - */ -AWS.CognitoIdentityCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * @api private - */ - localStorageKey: { - id: 'aws.cognito.identity-id.', - providers: 'aws.cognito.identity-providers.' - }, - - /** - * Creates a new credentials object. - * @example Creating a new credentials object - * AWS.config.credentials = new AWS.CognitoIdentityCredentials({ - * - * // either IdentityPoolId or IdentityId is required - * // See the IdentityPoolId param for AWS.CognitoIdentity.getID (linked below) - * // See the IdentityId param for AWS.CognitoIdentity.getCredentialsForIdentity - * // or AWS.CognitoIdentity.getOpenIdToken (linked below) - * IdentityPoolId: 'us-east-1:1699ebc0-7900-4099-b910-2df94f52a030', - * IdentityId: 'us-east-1:128d0a74-c82f-4553-916d-90053e4a8b0f' - * - * // optional, only necessary when the identity pool is not configured - * // to use IAM roles in the Amazon Cognito Console - * // See the RoleArn param for AWS.STS.assumeRoleWithWebIdentity (linked below) - * RoleArn: 'arn:aws:iam::1234567890:role/MYAPP-CognitoIdentity', - * - * // optional tokens, used for authenticated login - * // See the Logins param for AWS.CognitoIdentity.getID (linked below) - * Logins: { - * 'graph.facebook.com': 'FBTOKEN', - * 'www.amazon.com': 'AMAZONTOKEN', - * 'accounts.google.com': 'GOOGLETOKEN', - * 'api.twitter.com': 'TWITTERTOKEN', - * 'www.digits.com': 'DIGITSTOKEN' - * }, - * - * // optional name, defaults to web-identity - * // See the RoleSessionName param for AWS.STS.assumeRoleWithWebIdentity (linked below) - * RoleSessionName: 'web', - * - * // optional, only necessary when application runs in a browser - * // and multiple users are signed in at once, used for caching - * LoginId: 'example@gmail.com' - * - * }, { - * // optionally provide configuration to apply to the underlying service clients - * // if configuration is not provided, then configuration will be pulled from AWS.config - * - * // region should match the region your identity pool is located in - * region: 'us-east-1', - * - * // specify timeout options - * httpOptions: { - * timeout: 100 - * } - * }); - * @see AWS.CognitoIdentity.getId - * @see AWS.CognitoIdentity.getCredentialsForIdentity - * @see AWS.STS.assumeRoleWithWebIdentity - * @see AWS.CognitoIdentity.getOpenIdToken - * @see AWS.Config - * @note If a region is not provided in the global AWS.config, or - * specified in the `clientConfig` to the CognitoIdentityCredentials - * constructor, you may encounter a 'Missing credentials in config' error - * when calling making a service call. - */ - constructor: function CognitoIdentityCredentials(params, clientConfig) { - AWS.Credentials.call(this); - this.expired = true; - this.params = params; - this.data = null; - this._identityId = null; - this._clientConfig = AWS.util.copy(clientConfig || {}); - this.loadCachedId(); - var self = this; - Object.defineProperty(this, 'identityId', { - get: function() { - self.loadCachedId(); - return self._identityId || self.params.IdentityId; - }, - set: function(identityId) { - self._identityId = identityId; - } - }); - }, - - /** - * Refreshes credentials using {AWS.CognitoIdentity.getCredentialsForIdentity}, - * or {AWS.STS.assumeRoleWithWebIdentity}. - * - * @callback callback function(err) - * Called when the STS service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see AWS.Credentials.get - */ - refresh: function refresh(callback) { - this.coalesceRefresh(callback || AWS.util.fn.callback); - }, - - /** - * @api private - * @param callback - */ - load: function load(callback) { - var self = this; - self.createClients(); - self.data = null; - self._identityId = null; - self.getId(function(err) { - if (!err) { - if (!self.params.RoleArn) { - self.getCredentialsForIdentity(callback); - } else { - self.getCredentialsFromSTS(callback); - } - } else { - self.clearIdOnNotAuthorized(err); - callback(err); - } - }); - }, - - /** - * Clears the cached Cognito ID associated with the currently configured - * identity pool ID. Use this to manually invalidate your cache if - * the identity pool ID was deleted. - */ - clearCachedId: function clearCache() { - this._identityId = null; - delete this.params.IdentityId; - - var poolId = this.params.IdentityPoolId; - var loginId = this.params.LoginId || ''; - delete this.storage[this.localStorageKey.id + poolId + loginId]; - delete this.storage[this.localStorageKey.providers + poolId + loginId]; - }, - - /** - * @api private - */ - clearIdOnNotAuthorized: function clearIdOnNotAuthorized(err) { - var self = this; - if (err.code == 'NotAuthorizedException') { - self.clearCachedId(); - } - }, - - /** - * Retrieves a Cognito ID, loading from cache if it was already retrieved - * on this device. - * - * @callback callback function(err, identityId) - * @param err [Error, null] an error object if the call failed or null if - * it succeeded. - * @param identityId [String, null] if successful, the callback will return - * the Cognito ID. - * @note If not loaded explicitly, the Cognito ID is loaded and stored in - * localStorage in the browser environment of a device. - * @api private - */ - getId: function getId(callback) { - var self = this; - if (typeof self.params.IdentityId === 'string') { - return callback(null, self.params.IdentityId); - } - - self.cognito.getId(function(err, data) { - if (!err && data.IdentityId) { - self.params.IdentityId = data.IdentityId; - callback(null, data.IdentityId); - } else { - callback(err); - } - }); - }, - - - /** - * @api private - */ - loadCredentials: function loadCredentials(data, credentials) { - if (!data || !credentials) return; - credentials.expired = false; - credentials.accessKeyId = data.Credentials.AccessKeyId; - credentials.secretAccessKey = data.Credentials.SecretKey; - credentials.sessionToken = data.Credentials.SessionToken; - credentials.expireTime = data.Credentials.Expiration; - }, - - /** - * @api private - */ - getCredentialsForIdentity: function getCredentialsForIdentity(callback) { - var self = this; - self.cognito.getCredentialsForIdentity(function(err, data) { - if (!err) { - self.cacheId(data); - self.data = data; - self.loadCredentials(self.data, self); - } else { - self.clearIdOnNotAuthorized(err); - } - callback(err); - }); - }, - - /** - * @api private - */ - getCredentialsFromSTS: function getCredentialsFromSTS(callback) { - var self = this; - self.cognito.getOpenIdToken(function(err, data) { - if (!err) { - self.cacheId(data); - self.params.WebIdentityToken = data.Token; - self.webIdentityCredentials.refresh(function(webErr) { - if (!webErr) { - self.data = self.webIdentityCredentials.data; - self.sts.credentialsFrom(self.data, self); - } - callback(webErr); - }); - } else { - self.clearIdOnNotAuthorized(err); - callback(err); - } - }); - }, - - /** - * @api private - */ - loadCachedId: function loadCachedId() { - var self = this; - - // in the browser we source default IdentityId from localStorage - if (AWS.util.isBrowser() && !self.params.IdentityId) { - var id = self.getStorage('id'); - if (id && self.params.Logins) { - var actualProviders = Object.keys(self.params.Logins); - var cachedProviders = - (self.getStorage('providers') || '').split(','); - - // only load ID if at least one provider used this ID before - var intersect = cachedProviders.filter(function(n) { - return actualProviders.indexOf(n) !== -1; - }); - if (intersect.length !== 0) { - self.params.IdentityId = id; - } - } else if (id) { - self.params.IdentityId = id; - } - } - }, - - /** - * @api private - */ - createClients: function() { - var clientConfig = this._clientConfig; - this.webIdentityCredentials = this.webIdentityCredentials || - new AWS.WebIdentityCredentials(this.params, clientConfig); - if (!this.cognito) { - var cognitoConfig = AWS.util.merge({}, clientConfig); - cognitoConfig.params = this.params; - this.cognito = new CognitoIdentity(cognitoConfig); - } - this.sts = this.sts || new STS(clientConfig); - }, - - /** - * @api private - */ - cacheId: function cacheId(data) { - this._identityId = data.IdentityId; - this.params.IdentityId = this._identityId; - - // cache this IdentityId in browser localStorage if possible - if (AWS.util.isBrowser()) { - this.setStorage('id', data.IdentityId); - - if (this.params.Logins) { - this.setStorage('providers', Object.keys(this.params.Logins).join(',')); - } - } - }, - - /** - * @api private - */ - getStorage: function getStorage(key) { - return this.storage[this.localStorageKey[key] + this.params.IdentityPoolId + (this.params.LoginId || '')]; - }, - - /** - * @api private - */ - setStorage: function setStorage(key, val) { - try { - this.storage[this.localStorageKey[key] + this.params.IdentityPoolId + (this.params.LoginId || '')] = val; - } catch (_) {} - }, - - /** - * @api private - */ - storage: (function() { - try { - var storage = AWS.util.isBrowser() && window.localStorage !== null && typeof window.localStorage === 'object' ? - window.localStorage : {}; - - // Test set/remove which would throw an error in Safari's private browsing - storage['aws.test-storage'] = 'foobar'; - delete storage['aws.test-storage']; - - return storage; - } catch (_) { - return {}; - } - })() -}); - - -/***/ }), - -/***/ 36965: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -/** - * Creates a credential provider chain that searches for AWS credentials - * in a list of credential providers specified by the {providers} property. - * - * By default, the chain will use the {defaultProviders} to resolve credentials. - * These providers will look in the environment using the - * {AWS.EnvironmentCredentials} class with the 'AWS' and 'AMAZON' prefixes. - * - * ## Setting Providers - * - * Each provider in the {providers} list should be a function that returns - * a {AWS.Credentials} object, or a hardcoded credentials object. The function - * form allows for delayed execution of the credential construction. - * - * ## Resolving Credentials from a Chain - * - * Call {resolve} to return the first valid credential object that can be - * loaded by the provider chain. - * - * For example, to resolve a chain with a custom provider that checks a file - * on disk after the set of {defaultProviders}: - * - * ```javascript - * var diskProvider = new AWS.FileSystemCredentials('./creds.json'); - * var chain = new AWS.CredentialProviderChain(); - * chain.providers.push(diskProvider); - * chain.resolve(); - * ``` - * - * The above code will return the `diskProvider` object if the - * file contains credentials and the `defaultProviders` do not contain - * any credential settings. - * - * @!attribute providers - * @return [Array] - * a list of credentials objects or functions that return credentials - * objects. If the provider is a function, the function will be - * executed lazily when the provider needs to be checked for valid - * credentials. By default, this object will be set to the - * {defaultProviders}. - * @see defaultProviders - */ -AWS.CredentialProviderChain = AWS.util.inherit(AWS.Credentials, { - - /** - * Creates a new CredentialProviderChain with a default set of providers - * specified by {defaultProviders}. - */ - constructor: function CredentialProviderChain(providers) { - if (providers) { - this.providers = providers; - } else { - this.providers = AWS.CredentialProviderChain.defaultProviders.slice(0); - } - this.resolveCallbacks = []; - }, - - /** - * @!method resolvePromise() - * Returns a 'thenable' promise. - * Resolves the provider chain by searching for the first set of - * credentials in {providers}. - * - * Two callbacks can be provided to the `then` method on the returned promise. - * The first callback will be called if the promise is fulfilled, and the second - * callback will be called if the promise is rejected. - * @callback fulfilledCallback function(credentials) - * Called if the promise is fulfilled and the provider resolves the chain - * to a credentials object - * @param credentials [AWS.Credentials] the credentials object resolved - * by the provider chain. - * @callback rejectedCallback function(error) - * Called if the promise is rejected. - * @param err [Error] the error object returned if no credentials are found. - * @return [Promise] A promise that represents the state of the `resolve` method call. - * @example Calling the `resolvePromise` method. - * var promise = chain.resolvePromise(); - * promise.then(function(credentials) { ... }, function(err) { ... }); - */ - - /** - * Resolves the provider chain by searching for the first set of - * credentials in {providers}. - * - * @callback callback function(err, credentials) - * Called when the provider resolves the chain to a credentials object - * or null if no credentials can be found. - * - * @param err [Error] the error object returned if no credentials are - * found. - * @param credentials [AWS.Credentials] the credentials object resolved - * by the provider chain. - * @return [AWS.CredentialProviderChain] the provider, for chaining. - */ - resolve: function resolve(callback) { - var self = this; - if (self.providers.length === 0) { - callback(new Error('No providers')); - return self; - } - - if (self.resolveCallbacks.push(callback) === 1) { - var index = 0; - var providers = self.providers.slice(0); - - function resolveNext(err, creds) { - if ((!err && creds) || index === providers.length) { - AWS.util.arrayEach(self.resolveCallbacks, function (callback) { - callback(err, creds); - }); - self.resolveCallbacks.length = 0; - return; - } - - var provider = providers[index++]; - if (typeof provider === 'function') { - creds = provider.call(); - } else { - creds = provider; - } - - if (creds.get) { - creds.get(function (getErr) { - resolveNext(getErr, getErr ? null : creds); - }); - } else { - resolveNext(null, creds); - } - } - - resolveNext(); - } - - return self; - } -}); - -/** - * The default set of providers used by a vanilla CredentialProviderChain. - * - * In the browser: - * - * ```javascript - * AWS.CredentialProviderChain.defaultProviders = [] - * ``` - * - * In Node.js: - * - * ```javascript - * AWS.CredentialProviderChain.defaultProviders = [ - * function () { return new AWS.EnvironmentCredentials('AWS'); }, - * function () { return new AWS.EnvironmentCredentials('AMAZON'); }, - * function () { return new AWS.SharedIniFileCredentials(); }, - * function () { return new AWS.ECSCredentials(); }, - * function () { return new AWS.ProcessCredentials(); }, - * function () { return new AWS.TokenFileWebIdentityCredentials(); }, - * function () { return new AWS.EC2MetadataCredentials() } - * ] - * ``` - */ -AWS.CredentialProviderChain.defaultProviders = []; - -/** - * @api private - */ -AWS.CredentialProviderChain.addPromisesToClass = function addPromisesToClass(PromiseDependency) { - this.prototype.resolvePromise = AWS.util.promisifyMethod('resolve', PromiseDependency); -}; - -/** - * @api private - */ -AWS.CredentialProviderChain.deletePromisesFromClass = function deletePromisesFromClass() { - delete this.prototype.resolvePromise; -}; - -AWS.util.addPromises(AWS.CredentialProviderChain); - - -/***/ }), - -/***/ 73379: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -__nccwpck_require__(25768); - -/** - * Represents credentials received from the metadata service on an EC2 instance. - * - * By default, this class will connect to the metadata service using - * {AWS.MetadataService} and attempt to load any available credentials. If it - * can connect, and credentials are available, these will be used with zero - * configuration. - * - * This credentials class will by default timeout after 1 second of inactivity - * and retry 3 times. - * If your requests to the EC2 metadata service are timing out, you can increase - * these values by configuring them directly: - * - * ```javascript - * AWS.config.credentials = new AWS.EC2MetadataCredentials({ - * httpOptions: { timeout: 5000 }, // 5 second timeout - * maxRetries: 10, // retry 10 times - * retryDelayOptions: { base: 200 } // see AWS.Config for information - * }); - * - * If your requests are timing out in connecting to the metadata service, such - * as when testing on a development machine, you can use the connectTimeout - * option, specified in milliseconds, which also defaults to 1 second. - * ``` - * - * @see AWS.Config.retryDelayOptions - * - * @!macro nobrowser - */ -AWS.EC2MetadataCredentials = AWS.util.inherit(AWS.Credentials, { - constructor: function EC2MetadataCredentials(options) { - AWS.Credentials.call(this); - - options = options ? AWS.util.copy(options) : {}; - options = AWS.util.merge( - {maxRetries: this.defaultMaxRetries}, options); - if (!options.httpOptions) options.httpOptions = {}; - options.httpOptions = AWS.util.merge( - {timeout: this.defaultTimeout, - connectTimeout: this.defaultConnectTimeout}, - options.httpOptions); - - this.metadataService = new AWS.MetadataService(options); - this.metadata = {}; - }, - - /** - * @api private - */ - defaultTimeout: 1000, - - /** - * @api private - */ - defaultConnectTimeout: 1000, - - /** - * @api private - */ - defaultMaxRetries: 3, - - /** - * Loads the credentials from the instance metadata service - * - * @callback callback function(err) - * Called when the instance metadata service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - this.coalesceRefresh(callback || AWS.util.fn.callback); - }, - - /** - * @api private - * @param callback - */ - load: function load(callback) { - var self = this; - self.metadataService.loadCredentials(function(err, creds) { - if (!err) { - var currentTime = AWS.util.date.getDate(); - var expireTime = new Date(creds.Expiration); - if (expireTime < currentTime) { - err = AWS.util.error( - new Error('EC2 Instance Metadata Serivce provided expired credentials'), - { code: 'EC2MetadataCredentialsProviderFailure' } - ); - } else { - self.expired = false; - self.metadata = creds; - self.accessKeyId = creds.AccessKeyId; - self.secretAccessKey = creds.SecretAccessKey; - self.sessionToken = creds.Token; - self.expireTime = expireTime; - } - } - callback(err); - }); - } -}); - - -/***/ }), - -/***/ 10645: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -/** - * Represents credentials received from relative URI specified in the ECS container. - * - * This class will request refreshable credentials from the relative URI - * specified by the AWS_CONTAINER_CREDENTIALS_RELATIVE_URI or the - * AWS_CONTAINER_CREDENTIALS_FULL_URI environment variable. If valid credentials - * are returned in the response, these will be used with zero configuration. - * - * This credentials class will by default timeout after 1 second of inactivity - * and retry 3 times. - * If your requests to the relative URI are timing out, you can increase - * the value by configuring them directly: - * - * ```javascript - * AWS.config.credentials = new AWS.ECSCredentials({ - * httpOptions: { timeout: 5000 }, // 5 second timeout - * maxRetries: 10, // retry 10 times - * retryDelayOptions: { base: 200 } // see AWS.Config for information - * }); - * ``` - * - * @see AWS.Config.retryDelayOptions - * - * @!macro nobrowser - */ -AWS.ECSCredentials = AWS.RemoteCredentials; - - -/***/ }), - -/***/ 57714: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -/** - * Represents credentials from the environment. - * - * By default, this class will look for the matching environment variables - * prefixed by a given {envPrefix}. The un-prefixed environment variable names - * for each credential value is listed below: - * - * ```javascript - * accessKeyId: ACCESS_KEY_ID - * secretAccessKey: SECRET_ACCESS_KEY - * sessionToken: SESSION_TOKEN - * ``` - * - * With the default prefix of 'AWS', the environment variables would be: - * - * AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN - * - * @!attribute envPrefix - * @readonly - * @return [String] the prefix for the environment variable names excluding - * the separating underscore ('_'). - */ -AWS.EnvironmentCredentials = AWS.util.inherit(AWS.Credentials, { - - /** - * Creates a new EnvironmentCredentials class with a given variable - * prefix {envPrefix}. For example, to load credentials using the 'AWS' - * prefix: - * - * ```javascript - * var creds = new AWS.EnvironmentCredentials('AWS'); - * creds.accessKeyId == 'AKID' // from AWS_ACCESS_KEY_ID env var - * ``` - * - * @param envPrefix [String] the prefix to use (e.g., 'AWS') for environment - * variables. Do not include the separating underscore. - */ - constructor: function EnvironmentCredentials(envPrefix) { - AWS.Credentials.call(this); - this.envPrefix = envPrefix; - this.get(function() {}); - }, - - /** - * Loads credentials from the environment using the prefixed - * environment variables. - * - * @callback callback function(err) - * Called after the (prefixed) ACCESS_KEY_ID, SECRET_ACCESS_KEY, and - * SESSION_TOKEN environment variables are read. When this callback is - * called with no error, it means that the credentials information has - * been loaded into the object (as the `accessKeyId`, `secretAccessKey`, - * and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - if (!callback) callback = AWS.util.fn.callback; - - if (!process || !process.env) { - callback(AWS.util.error( - new Error('No process info or environment variables available'), - { code: 'EnvironmentCredentialsProviderFailure' } - )); - return; - } - - var keys = ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY', 'SESSION_TOKEN']; - var values = []; - - for (var i = 0; i < keys.length; i++) { - var prefix = ''; - if (this.envPrefix) prefix = this.envPrefix + '_'; - values[i] = process.env[prefix + keys[i]]; - if (!values[i] && keys[i] !== 'SESSION_TOKEN') { - callback(AWS.util.error( - new Error('Variable ' + prefix + keys[i] + ' not set.'), - { code: 'EnvironmentCredentialsProviderFailure' } - )); - return; - } - } - - this.expired = false; - AWS.Credentials.apply(this, values); - callback(); - } - -}); - - -/***/ }), - -/***/ 27454: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -/** - * Represents credentials from a JSON file on disk. - * If the credentials expire, the SDK can {refresh} the credentials - * from the file. - * - * The format of the file should be similar to the options passed to - * {AWS.Config}: - * - * ```javascript - * {accessKeyId: 'akid', secretAccessKey: 'secret', sessionToken: 'optional'} - * ``` - * - * @example Loading credentials from disk - * var creds = new AWS.FileSystemCredentials('./configuration.json'); - * creds.accessKeyId == 'AKID' - * - * @!attribute filename - * @readonly - * @return [String] the path to the JSON file on disk containing the - * credentials. - * @!macro nobrowser - */ -AWS.FileSystemCredentials = AWS.util.inherit(AWS.Credentials, { - - /** - * @overload AWS.FileSystemCredentials(filename) - * Creates a new FileSystemCredentials object from a filename - * - * @param filename [String] the path on disk to the JSON file to load. - */ - constructor: function FileSystemCredentials(filename) { - AWS.Credentials.call(this); - this.filename = filename; - this.get(function() {}); - }, - - /** - * Loads the credentials from the {filename} on disk. - * - * @callback callback function(err) - * Called after the JSON file on disk is read and parsed. When this callback - * is called with no error, it means that the credentials information - * has been loaded into the object (as the `accessKeyId`, `secretAccessKey`, - * and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - if (!callback) callback = AWS.util.fn.callback; - try { - var creds = JSON.parse(AWS.util.readFileSync(this.filename)); - AWS.Credentials.call(this, creds); - if (!this.accessKeyId || !this.secretAccessKey) { - throw AWS.util.error( - new Error('Credentials not set in ' + this.filename), - { code: 'FileSystemCredentialsProviderFailure' } - ); - } - this.expired = false; - callback(); - } catch (err) { - callback(err); - } - } - -}); - - -/***/ }), - -/***/ 80371: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var proc = __nccwpck_require__(63129); -var iniLoader = AWS.util.iniLoader; - -/** - * Represents credentials loaded from shared credentials file - * (defaulting to ~/.aws/credentials or defined by the - * `AWS_SHARED_CREDENTIALS_FILE` environment variable). - * - * ## Using process credentials - * - * The credentials file can specify a credential provider that executes - * a given process and attempts to read its stdout to recieve a JSON payload - * containing the credentials: - * - * [default] - * credential_process = /usr/bin/credential_proc - * - * Automatically handles refreshing credentials if an Expiration time is - * provided in the credentials payload. Credentials supplied in the same profile - * will take precedence over the credential_process. - * - * Sourcing credentials from an external process can potentially be dangerous, - * so proceed with caution. Other credential providers should be preferred if - * at all possible. If using this option, you should make sure that the shared - * credentials file is as locked down as possible using security best practices - * for your operating system. - * - * ## Using custom profiles - * - * The SDK supports loading credentials for separate profiles. This can be done - * in two ways: - * - * 1. Set the `AWS_PROFILE` environment variable in your process prior to - * loading the SDK. - * 2. Directly load the AWS.ProcessCredentials provider: - * - * ```javascript - * var creds = new AWS.ProcessCredentials({profile: 'myprofile'}); - * AWS.config.credentials = creds; - * ``` - * - * @!macro nobrowser - */ -AWS.ProcessCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * Creates a new ProcessCredentials object. - * - * @param options [map] a set of options - * @option options profile [String] (AWS_PROFILE env var or 'default') - * the name of the profile to load. - * @option options filename [String] ('~/.aws/credentials' or defined by - * AWS_SHARED_CREDENTIALS_FILE process env var) - * the filename to use when loading credentials. - * @option options callback [Function] (err) Credentials are eagerly loaded - * by the constructor. When the callback is called with no error, the - * credentials have been loaded successfully. - */ - constructor: function ProcessCredentials(options) { - AWS.Credentials.call(this); - - options = options || {}; - - this.filename = options.filename; - this.profile = options.profile || process.env.AWS_PROFILE || AWS.util.defaultProfile; - this.get(options.callback || AWS.util.fn.noop); - }, - - /** - * @api private - */ - load: function load(callback) { - var self = this; - try { - var profiles = AWS.util.getProfilesFromSharedConfig(iniLoader, this.filename); - var profile = profiles[this.profile] || {}; - - if (Object.keys(profile).length === 0) { - throw AWS.util.error( - new Error('Profile ' + this.profile + ' not found'), - { code: 'ProcessCredentialsProviderFailure' } - ); - } - - if (profile['credential_process']) { - this.loadViaCredentialProcess(profile, function(err, data) { - if (err) { - callback(err, null); - } else { - self.expired = false; - self.accessKeyId = data.AccessKeyId; - self.secretAccessKey = data.SecretAccessKey; - self.sessionToken = data.SessionToken; - if (data.Expiration) { - self.expireTime = new Date(data.Expiration); - } - callback(null); - } - }); - } else { - throw AWS.util.error( - new Error('Profile ' + this.profile + ' did not include credential process'), - { code: 'ProcessCredentialsProviderFailure' } - ); - } - } catch (err) { - callback(err); - } - }, - - /** - * Executes the credential_process and retrieves - * credentials from the output - * @api private - * @param profile [map] credentials profile - * @throws ProcessCredentialsProviderFailure - */ - loadViaCredentialProcess: function loadViaCredentialProcess(profile, callback) { - proc.exec(profile['credential_process'], { env: process.env }, function(err, stdOut, stdErr) { - if (err) { - callback(AWS.util.error( - new Error('credential_process returned error'), - { code: 'ProcessCredentialsProviderFailure'} - ), null); - } else { - try { - var credData = JSON.parse(stdOut); - if (credData.Expiration) { - var currentTime = AWS.util.date.getDate(); - var expireTime = new Date(credData.Expiration); - if (expireTime < currentTime) { - throw Error('credential_process returned expired credentials'); - } - } - - if (credData.Version !== 1) { - throw Error('credential_process does not return Version == 1'); - } - callback(null, credData); - } catch (err) { - callback(AWS.util.error( - new Error(err.message), - { code: 'ProcessCredentialsProviderFailure'} - ), null); - } - } - }); - }, - - /** - * Loads the credentials from the credential process - * - * @callback callback function(err) - * Called after the credential process has been executed. When this - * callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - iniLoader.clearCachedFiles(); - this.coalesceRefresh(callback || AWS.util.fn.callback); - } -}); - - -/***/ }), - -/***/ 88764: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437), - ENV_RELATIVE_URI = 'AWS_CONTAINER_CREDENTIALS_RELATIVE_URI', - ENV_FULL_URI = 'AWS_CONTAINER_CREDENTIALS_FULL_URI', - ENV_AUTH_TOKEN = 'AWS_CONTAINER_AUTHORIZATION_TOKEN', - FULL_URI_UNRESTRICTED_PROTOCOLS = ['https:'], - FULL_URI_ALLOWED_PROTOCOLS = ['http:', 'https:'], - FULL_URI_ALLOWED_HOSTNAMES = ['localhost', '127.0.0.1'], - RELATIVE_URI_HOST = '169.254.170.2'; - -/** - * Represents credentials received from specified URI. - * - * This class will request refreshable credentials from the relative URI - * specified by the AWS_CONTAINER_CREDENTIALS_RELATIVE_URI or the - * AWS_CONTAINER_CREDENTIALS_FULL_URI environment variable. If valid credentials - * are returned in the response, these will be used with zero configuration. - * - * This credentials class will by default timeout after 1 second of inactivity - * and retry 3 times. - * If your requests to the relative URI are timing out, you can increase - * the value by configuring them directly: - * - * ```javascript - * AWS.config.credentials = new AWS.RemoteCredentials({ - * httpOptions: { timeout: 5000 }, // 5 second timeout - * maxRetries: 10, // retry 10 times - * retryDelayOptions: { base: 200 } // see AWS.Config for information - * }); - * ``` - * - * @see AWS.Config.retryDelayOptions - * - * @!macro nobrowser - */ -AWS.RemoteCredentials = AWS.util.inherit(AWS.Credentials, { - constructor: function RemoteCredentials(options) { - AWS.Credentials.call(this); - options = options ? AWS.util.copy(options) : {}; - if (!options.httpOptions) options.httpOptions = {}; - options.httpOptions = AWS.util.merge( - this.httpOptions, options.httpOptions); - AWS.util.update(this, options); - }, - - /** - * @api private - */ - httpOptions: { timeout: 1000 }, - - /** - * @api private - */ - maxRetries: 3, - - /** - * @api private - */ - isConfiguredForEcsCredentials: function isConfiguredForEcsCredentials() { - return Boolean( - process && - process.env && - (process.env[ENV_RELATIVE_URI] || process.env[ENV_FULL_URI]) - ); - }, - - /** - * @api private - */ - getECSFullUri: function getECSFullUri() { - if (process && process.env) { - var relative = process.env[ENV_RELATIVE_URI], - full = process.env[ENV_FULL_URI]; - if (relative) { - return 'http://' + RELATIVE_URI_HOST + relative; - } else if (full) { - var parsed = AWS.util.urlParse(full); - if (FULL_URI_ALLOWED_PROTOCOLS.indexOf(parsed.protocol) < 0) { - throw AWS.util.error( - new Error('Unsupported protocol: AWS.RemoteCredentials supports ' - + FULL_URI_ALLOWED_PROTOCOLS.join(',') + ' only; ' - + parsed.protocol + ' requested.'), - { code: 'ECSCredentialsProviderFailure' } - ); - } - - if (FULL_URI_UNRESTRICTED_PROTOCOLS.indexOf(parsed.protocol) < 0 && - FULL_URI_ALLOWED_HOSTNAMES.indexOf(parsed.hostname) < 0) { - throw AWS.util.error( - new Error('Unsupported hostname: AWS.RemoteCredentials only supports ' - + FULL_URI_ALLOWED_HOSTNAMES.join(',') + ' for ' + parsed.protocol + '; ' - + parsed.protocol + '//' + parsed.hostname + ' requested.'), - { code: 'ECSCredentialsProviderFailure' } - ); - } - - return full; - } else { - throw AWS.util.error( - new Error('Variable ' + ENV_RELATIVE_URI + ' or ' + ENV_FULL_URI + - ' must be set to use AWS.RemoteCredentials.'), - { code: 'ECSCredentialsProviderFailure' } - ); - } - } else { - throw AWS.util.error( - new Error('No process info available'), - { code: 'ECSCredentialsProviderFailure' } - ); - } - }, - - /** - * @api private - */ - getECSAuthToken: function getECSAuthToken() { - if (process && process.env && process.env[ENV_FULL_URI]) { - return process.env[ENV_AUTH_TOKEN]; - } - }, - - /** - * @api private - */ - credsFormatIsValid: function credsFormatIsValid(credData) { - return (!!credData.accessKeyId && !!credData.secretAccessKey && - !!credData.sessionToken && !!credData.expireTime); - }, - - /** - * @api private - */ - formatCreds: function formatCreds(credData) { - if (!!credData.credentials) { - credData = credData.credentials; - } - - return { - expired: false, - accessKeyId: credData.accessKeyId || credData.AccessKeyId, - secretAccessKey: credData.secretAccessKey || credData.SecretAccessKey, - sessionToken: credData.sessionToken || credData.Token, - expireTime: new Date(credData.expiration || credData.Expiration) - }; - }, - - /** - * @api private - */ - request: function request(url, callback) { - var httpRequest = new AWS.HttpRequest(url); - httpRequest.method = 'GET'; - httpRequest.headers.Accept = 'application/json'; - var token = this.getECSAuthToken(); - if (token) { - httpRequest.headers.Authorization = token; - } - AWS.util.handleRequestWithRetries(httpRequest, this, callback); - }, - - /** - * Loads the credentials from the relative URI specified by container - * - * @callback callback function(err) - * Called when the request to the relative URI responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, `sessionToken`, and `expireTime` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - this.coalesceRefresh(callback || AWS.util.fn.callback); - }, - - /** - * @api private - */ - load: function load(callback) { - var self = this; - var fullUri; - - try { - fullUri = this.getECSFullUri(); - } catch (err) { - callback(err); - return; - } - - this.request(fullUri, function(err, data) { - if (!err) { - try { - data = JSON.parse(data); - var creds = self.formatCreds(data); - if (!self.credsFormatIsValid(creds)) { - throw AWS.util.error( - new Error('Response data is not in valid format'), - { code: 'ECSCredentialsProviderFailure' } - ); - } - AWS.util.update(self, creds); - } catch (dataError) { - err = dataError; - } - } - callback(err, creds); - }); - } -}); - - -/***/ }), - -/***/ 15037: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var STS = __nccwpck_require__(57513); - -/** - * Represents credentials retrieved from STS SAML support. - * - * By default this provider gets credentials using the - * {AWS.STS.assumeRoleWithSAML} service operation. This operation - * requires a `RoleArn` containing the ARN of the IAM trust policy for the - * application for which credentials will be given, as well as a `PrincipalArn` - * representing the ARN for the SAML identity provider. In addition, the - * `SAMLAssertion` must be set to the token provided by the identity - * provider. See {constructor} for an example on creating a credentials - * object with proper `RoleArn`, `PrincipalArn`, and `SAMLAssertion` values. - * - * ## Refreshing Credentials from Identity Service - * - * In addition to AWS credentials expiring after a given amount of time, the - * login token from the identity provider will also expire. Once this token - * expires, it will not be usable to refresh AWS credentials, and another - * token will be needed. The SDK does not manage refreshing of the token value, - * but this can be done through a "refresh token" supported by most identity - * providers. Consult the documentation for the identity provider for refreshing - * tokens. Once the refreshed token is acquired, you should make sure to update - * this new token in the credentials object's {params} property. The following - * code will update the SAMLAssertion, assuming you have retrieved an updated - * token from the identity provider: - * - * ```javascript - * AWS.config.credentials.params.SAMLAssertion = updatedToken; - * ``` - * - * Future calls to `credentials.refresh()` will now use the new token. - * - * @!attribute params - * @return [map] the map of params passed to - * {AWS.STS.assumeRoleWithSAML}. To update the token, set the - * `params.SAMLAssertion` property. - */ -AWS.SAMLCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * Creates a new credentials object. - * @param (see AWS.STS.assumeRoleWithSAML) - * @example Creating a new credentials object - * AWS.config.credentials = new AWS.SAMLCredentials({ - * RoleArn: 'arn:aws:iam::1234567890:role/SAMLRole', - * PrincipalArn: 'arn:aws:iam::1234567890:role/SAMLPrincipal', - * SAMLAssertion: 'base64-token', // base64-encoded token from IdP - * }); - * @see AWS.STS.assumeRoleWithSAML - */ - constructor: function SAMLCredentials(params) { - AWS.Credentials.call(this); - this.expired = true; - this.params = params; - }, - - /** - * Refreshes credentials using {AWS.STS.assumeRoleWithSAML} - * - * @callback callback function(err) - * Called when the STS service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - this.coalesceRefresh(callback || AWS.util.fn.callback); - }, - - /** - * @api private - */ - load: function load(callback) { - var self = this; - self.createClients(); - self.service.assumeRoleWithSAML(function (err, data) { - if (!err) { - self.service.credentialsFrom(data, self); - } - callback(err); - }); - }, - - /** - * @api private - */ - createClients: function() { - this.service = this.service || new STS({params: this.params}); - } - -}); - - -/***/ }), - -/***/ 13754: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var STS = __nccwpck_require__(57513); -var iniLoader = AWS.util.iniLoader; - -var ASSUME_ROLE_DEFAULT_REGION = 'us-east-1'; - -/** - * Represents credentials loaded from shared credentials file - * (defaulting to ~/.aws/credentials or defined by the - * `AWS_SHARED_CREDENTIALS_FILE` environment variable). - * - * ## Using the shared credentials file - * - * This provider is checked by default in the Node.js environment. To use the - * credentials file provider, simply add your access and secret keys to the - * ~/.aws/credentials file in the following format: - * - * [default] - * aws_access_key_id = AKID... - * aws_secret_access_key = YOUR_SECRET_KEY - * - * ## Using custom profiles - * - * The SDK supports loading credentials for separate profiles. This can be done - * in two ways: - * - * 1. Set the `AWS_PROFILE` environment variable in your process prior to - * loading the SDK. - * 2. Directly load the AWS.SharedIniFileCredentials provider: - * - * ```javascript - * var creds = new AWS.SharedIniFileCredentials({profile: 'myprofile'}); - * AWS.config.credentials = creds; - * ``` - * - * @!macro nobrowser - */ -AWS.SharedIniFileCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * Creates a new SharedIniFileCredentials object. - * - * @param options [map] a set of options - * @option options profile [String] (AWS_PROFILE env var or 'default') - * the name of the profile to load. - * @option options filename [String] ('~/.aws/credentials' or defined by - * AWS_SHARED_CREDENTIALS_FILE process env var) - * the filename to use when loading credentials. - * @option options disableAssumeRole [Boolean] (false) True to disable - * support for profiles that assume an IAM role. If true, and an assume - * role profile is selected, an error is raised. - * @option options preferStaticCredentials [Boolean] (false) True to - * prefer static credentials to role_arn if both are present. - * @option options tokenCodeFn [Function] (null) Function to provide - * STS Assume Role TokenCode, if mfa_serial is provided for profile in ini - * file. Function is called with value of mfa_serial and callback, and - * should provide the TokenCode or an error to the callback in the format - * callback(err, token) - * @option options callback [Function] (err) Credentials are eagerly loaded - * by the constructor. When the callback is called with no error, the - * credentials have been loaded successfully. - * @option options httpOptions [map] A set of options to pass to the low-level - * HTTP request. Currently supported options are: - * * **proxy** [String] — the URL to proxy requests through - * * **agent** [http.Agent, https.Agent] — the Agent object to perform - * HTTP requests with. Used for connection pooling. Defaults to the global - * agent (`http.globalAgent`) for non-SSL connections. Note that for - * SSL connections, a special Agent object is used in order to enable - * peer certificate verification. This feature is only available in the - * Node.js environment. - * * **connectTimeout** [Integer] — Sets the socket to timeout after - * failing to establish a connection with the server after - * `connectTimeout` milliseconds. This timeout has no effect once a socket - * connection has been established. - * * **timeout** [Integer] — The number of milliseconds a request can - * take before automatically being terminated. - * Defaults to two minutes (120000). - */ - constructor: function SharedIniFileCredentials(options) { - AWS.Credentials.call(this); - - options = options || {}; - - this.filename = options.filename; - this.profile = options.profile || process.env.AWS_PROFILE || AWS.util.defaultProfile; - this.disableAssumeRole = Boolean(options.disableAssumeRole); - this.preferStaticCredentials = Boolean(options.preferStaticCredentials); - this.tokenCodeFn = options.tokenCodeFn || null; - this.httpOptions = options.httpOptions || null; - this.get(options.callback || AWS.util.fn.noop); - }, - - /** - * @api private - */ - load: function load(callback) { - var self = this; - try { - var profiles = AWS.util.getProfilesFromSharedConfig(iniLoader, this.filename); - var profile = profiles[this.profile] || {}; - - if (Object.keys(profile).length === 0) { - throw AWS.util.error( - new Error('Profile ' + this.profile + ' not found'), - { code: 'SharedIniFileCredentialsProviderFailure' } - ); - } - - /* - In the CLI, the presence of both a role_arn and static credentials have - different meanings depending on how many profiles have been visited. For - the first profile processed, role_arn takes precedence over any static - credentials, but for all subsequent profiles, static credentials are - used if present, and only in their absence will the profile's - source_profile and role_arn keys be used to load another set of - credentials. This var is intended to yield compatible behaviour in this - sdk. - */ - var preferStaticCredentialsToRoleArn = Boolean( - this.preferStaticCredentials - && profile['aws_access_key_id'] - && profile['aws_secret_access_key'] - ); - - if (profile['role_arn'] && !preferStaticCredentialsToRoleArn) { - this.loadRoleProfile(profiles, profile, function(err, data) { - if (err) { - callback(err); - } else { - self.expired = false; - self.accessKeyId = data.Credentials.AccessKeyId; - self.secretAccessKey = data.Credentials.SecretAccessKey; - self.sessionToken = data.Credentials.SessionToken; - self.expireTime = data.Credentials.Expiration; - callback(null); - } - }); - return; - } - - this.accessKeyId = profile['aws_access_key_id']; - this.secretAccessKey = profile['aws_secret_access_key']; - this.sessionToken = profile['aws_session_token']; - - if (!this.accessKeyId || !this.secretAccessKey) { - throw AWS.util.error( - new Error('Credentials not set for profile ' + this.profile), - { code: 'SharedIniFileCredentialsProviderFailure' } - ); - } - this.expired = false; - callback(null); - } catch (err) { - callback(err); - } - }, - - /** - * Loads the credentials from the shared credentials file - * - * @callback callback function(err) - * Called after the shared INI file on disk is read and parsed. When this - * callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - iniLoader.clearCachedFiles(); - this.coalesceRefresh( - callback || AWS.util.fn.callback, - this.disableAssumeRole - ); - }, - - /** - * @api private - */ - loadRoleProfile: function loadRoleProfile(creds, roleProfile, callback) { - if (this.disableAssumeRole) { - throw AWS.util.error( - new Error('Role assumption profiles are disabled. ' + - 'Failed to load profile ' + this.profile + - ' from ' + creds.filename), - { code: 'SharedIniFileCredentialsProviderFailure' } - ); - } - - var self = this; - var roleArn = roleProfile['role_arn']; - var roleSessionName = roleProfile['role_session_name']; - var externalId = roleProfile['external_id']; - var mfaSerial = roleProfile['mfa_serial']; - var sourceProfileName = roleProfile['source_profile']; - - // From experimentation, the following behavior mimics the AWS CLI: - // - // 1. Use region from the profile if present. - // 2. Otherwise fall back to N. Virginia (global endpoint). - // - // It is necessary to do the fallback explicitly, because if - // 'AWS_STS_REGIONAL_ENDPOINTS=regional', the underlying STS client will - // otherwise throw an error if region is left 'undefined'. - // - // Experimentation shows that the AWS CLI (tested at version 1.18.136) - // ignores the following potential sources of a region for the purposes of - // this AssumeRole call: - // - // - The [default] profile - // - The AWS_REGION environment variable - // - // Ignoring the [default] profile for the purposes of AssumeRole is arguably - // a bug in the CLI since it does use the [default] region for service - // calls... but right now we're matching behavior of the other tool. - var profileRegion = roleProfile['region'] || ASSUME_ROLE_DEFAULT_REGION; - - if (!sourceProfileName) { - throw AWS.util.error( - new Error('source_profile is not set using profile ' + this.profile), - { code: 'SharedIniFileCredentialsProviderFailure' } - ); - } - - var sourceProfileExistanceTest = creds[sourceProfileName]; - - if (typeof sourceProfileExistanceTest !== 'object') { - throw AWS.util.error( - new Error('source_profile ' + sourceProfileName + ' using profile ' - + this.profile + ' does not exist'), - { code: 'SharedIniFileCredentialsProviderFailure' } - ); - } - - var sourceCredentials = new AWS.SharedIniFileCredentials( - AWS.util.merge(this.options || {}, { - profile: sourceProfileName, - preferStaticCredentials: true - }) - ); - - this.roleArn = roleArn; - var sts = new STS({ - credentials: sourceCredentials, - region: profileRegion, - httpOptions: this.httpOptions - }); - - var roleParams = { - RoleArn: roleArn, - RoleSessionName: roleSessionName || 'aws-sdk-js-' + Date.now() - }; - - if (externalId) { - roleParams.ExternalId = externalId; - } - - if (mfaSerial && self.tokenCodeFn) { - roleParams.SerialNumber = mfaSerial; - self.tokenCodeFn(mfaSerial, function(err, token) { - if (err) { - var message; - if (err instanceof Error) { - message = err.message; - } else { - message = err; - } - callback( - AWS.util.error( - new Error('Error fetching MFA token: ' + message), - { code: 'SharedIniFileCredentialsProviderFailure' } - )); - return; - } - - roleParams.TokenCode = token; - sts.assumeRole(roleParams, callback); - }); - return; - } - sts.assumeRole(roleParams, callback); - } -}); - - -/***/ }), - -/***/ 77360: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var STS = __nccwpck_require__(57513); - -/** - * Represents temporary credentials retrieved from {AWS.STS}. Without any - * extra parameters, credentials will be fetched from the - * {AWS.STS.getSessionToken} operation. If an IAM role is provided, the - * {AWS.STS.assumeRole} operation will be used to fetch credentials for the - * role instead. - * - * @note AWS.TemporaryCredentials is deprecated, but remains available for - * backwards compatibility. {AWS.ChainableTemporaryCredentials} is the - * preferred class for temporary credentials. - * - * To setup temporary credentials, configure a set of master credentials - * using the standard credentials providers (environment, EC2 instance metadata, - * or from the filesystem), then set the global credentials to a new - * temporary credentials object: - * - * ```javascript - * // Note that environment credentials are loaded by default, - * // the following line is shown for clarity: - * AWS.config.credentials = new AWS.EnvironmentCredentials('AWS'); - * - * // Now set temporary credentials seeded from the master credentials - * AWS.config.credentials = new AWS.TemporaryCredentials(); - * - * // subsequent requests will now use temporary credentials from AWS STS. - * new AWS.S3().listBucket(function(err, data) { ... }); - * ``` - * - * @!attribute masterCredentials - * @return [AWS.Credentials] the master (non-temporary) credentials used to - * get and refresh temporary credentials from AWS STS. - * @note (see constructor) - */ -AWS.TemporaryCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * Creates a new temporary credentials object. - * - * @note In order to create temporary credentials, you first need to have - * "master" credentials configured in {AWS.Config.credentials}. These - * master credentials are necessary to retrieve the temporary credentials, - * as well as refresh the credentials when they expire. - * @param params [map] a map of options that are passed to the - * {AWS.STS.assumeRole} or {AWS.STS.getSessionToken} operations. - * If a `RoleArn` parameter is passed in, credentials will be based on the - * IAM role. - * @param masterCredentials [AWS.Credentials] the master (non-temporary) credentials - * used to get and refresh temporary credentials from AWS STS. - * @example Creating a new credentials object for generic temporary credentials - * AWS.config.credentials = new AWS.TemporaryCredentials(); - * @example Creating a new credentials object for an IAM role - * AWS.config.credentials = new AWS.TemporaryCredentials({ - * RoleArn: 'arn:aws:iam::1234567890:role/TemporaryCredentials', - * }); - * @see AWS.STS.assumeRole - * @see AWS.STS.getSessionToken - */ - constructor: function TemporaryCredentials(params, masterCredentials) { - AWS.Credentials.call(this); - this.loadMasterCredentials(masterCredentials); - this.expired = true; - - this.params = params || {}; - if (this.params.RoleArn) { - this.params.RoleSessionName = - this.params.RoleSessionName || 'temporary-credentials'; - } - }, - - /** - * Refreshes credentials using {AWS.STS.assumeRole} or - * {AWS.STS.getSessionToken}, depending on whether an IAM role ARN was passed - * to the credentials {constructor}. - * - * @callback callback function(err) - * Called when the STS service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh (callback) { - this.coalesceRefresh(callback || AWS.util.fn.callback); - }, - - /** - * @api private - */ - load: function load (callback) { - var self = this; - self.createClients(); - self.masterCredentials.get(function () { - self.service.config.credentials = self.masterCredentials; - var operation = self.params.RoleArn ? - self.service.assumeRole : self.service.getSessionToken; - operation.call(self.service, function (err, data) { - if (!err) { - self.service.credentialsFrom(data, self); - } - callback(err); - }); - }); - }, - - /** - * @api private - */ - loadMasterCredentials: function loadMasterCredentials (masterCredentials) { - this.masterCredentials = masterCredentials || AWS.config.credentials; - while (this.masterCredentials.masterCredentials) { - this.masterCredentials = this.masterCredentials.masterCredentials; - } - - if (typeof this.masterCredentials.get !== 'function') { - this.masterCredentials = new AWS.Credentials(this.masterCredentials); - } - }, - - /** - * @api private - */ - createClients: function () { - this.service = this.service || new STS({params: this.params}); - } - -}); - - -/***/ }), - -/***/ 11017: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var fs = __nccwpck_require__(35747); -var STS = __nccwpck_require__(57513); -var iniLoader = AWS.util.iniLoader; - -/** - * Represents OIDC credentials from a file on disk - * If the credentials expire, the SDK can {refresh} the credentials - * from the file. - * - * ## Using the web identity token file - * - * This provider is checked by default in the Node.js environment. To use - * the provider simply add your OIDC token to a file (ASCII encoding) and - * share the filename in either AWS_WEB_IDENTITY_TOKEN_FILE environment - * variable or web_identity_token_file shared config variable - * - * The file contains encoded OIDC token and the characters are - * ASCII encoded. OIDC tokens are JSON Web Tokens (JWT). - * JWT's are 3 base64 encoded strings joined by the '.' character. - * - * This class will read filename from AWS_WEB_IDENTITY_TOKEN_FILE - * environment variable or web_identity_token_file shared config variable, - * and get the OIDC token from filename. - * It will also read IAM role to be assumed from AWS_ROLE_ARN - * environment variable or role_arn shared config variable. - * This provider gets credetials using the {AWS.STS.assumeRoleWithWebIdentity} - * service operation - * - * @!macro nobrowser - */ -AWS.TokenFileWebIdentityCredentials = AWS.util.inherit(AWS.Credentials, { - - /** - * @example Creating a new credentials object - * AWS.config.credentials = new AWS.TokenFileWebIdentityCredentials( - * // optionally provide configuration to apply to the underlying AWS.STS service client - * // if configuration is not provided, then configuration will be pulled from AWS.config - * { - * // specify timeout options - * httpOptions: { - * timeout: 100 - * } - * }); - * @see AWS.Config - */ - constructor: function TokenFileWebIdentityCredentials(clientConfig) { - AWS.Credentials.call(this); - this.data = null; - this.clientConfig = AWS.util.copy(clientConfig || {}); - }, - - /** - * Returns params from environment variables - * - * @api private - */ - getParamsFromEnv: function getParamsFromEnv() { - var ENV_TOKEN_FILE = 'AWS_WEB_IDENTITY_TOKEN_FILE', - ENV_ROLE_ARN = 'AWS_ROLE_ARN'; - if (process.env[ENV_TOKEN_FILE] && process.env[ENV_ROLE_ARN]) { - return [{ - envTokenFile: process.env[ENV_TOKEN_FILE], - roleArn: process.env[ENV_ROLE_ARN], - roleSessionName: process.env['AWS_ROLE_SESSION_NAME'] - }]; - } - }, - - /** - * Returns params from shared config variables - * - * @api private - */ - getParamsFromSharedConfig: function getParamsFromSharedConfig() { - var profiles = AWS.util.getProfilesFromSharedConfig(iniLoader); - var profileName = process.env.AWS_PROFILE || AWS.util.defaultProfile; - var profile = profiles[profileName] || {}; - - if (Object.keys(profile).length === 0) { - throw AWS.util.error( - new Error('Profile ' + profileName + ' not found'), - { code: 'TokenFileWebIdentityCredentialsProviderFailure' } - ); - } - - var paramsArray = []; - - while (!profile['web_identity_token_file'] && profile['source_profile']) { - paramsArray.unshift({ - roleArn: profile['role_arn'], - roleSessionName: profile['role_session_name'] - }); - var sourceProfile = profile['source_profile']; - profile = profiles[sourceProfile]; - } - - paramsArray.unshift({ - envTokenFile: profile['web_identity_token_file'], - roleArn: profile['role_arn'], - roleSessionName: profile['role_session_name'] - }); - - return paramsArray; - }, - - /** - * Refreshes credentials using {AWS.STS.assumeRoleWithWebIdentity} - * - * @callback callback function(err) - * Called when the STS service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see AWS.Credentials.get - */ - refresh: function refresh(callback) { - this.coalesceRefresh(callback || AWS.util.fn.callback); - }, - - /** - * @api private - */ - assumeRoleChaining: function assumeRoleChaining(paramsArray, callback) { - var self = this; - if (paramsArray.length === 0) { - self.service.credentialsFrom(self.data, self); - callback(); - } else { - var params = paramsArray.shift(); - self.service.config.credentials = self.service.credentialsFrom(self.data, self); - self.service.assumeRole( - { - RoleArn: params.roleArn, - RoleSessionName: params.roleSessionName || 'token-file-web-identity' - }, - function (err, data) { - self.data = null; - if (err) { - callback(err); - } else { - self.data = data; - self.assumeRoleChaining(paramsArray, callback); - } - } - ); - } - }, - - /** - * @api private - */ - load: function load(callback) { - var self = this; - try { - var paramsArray = self.getParamsFromEnv(); - if (!paramsArray) { - paramsArray = self.getParamsFromSharedConfig(); - } - if (paramsArray) { - var params = paramsArray.shift(); - var oidcToken = fs.readFileSync(params.envTokenFile, {encoding: 'ascii'}); - if (!self.service) { - self.createClients(); - } - self.service.assumeRoleWithWebIdentity( - { - WebIdentityToken: oidcToken, - RoleArn: params.roleArn, - RoleSessionName: params.roleSessionName || 'token-file-web-identity' - }, - function (err, data) { - self.data = null; - if (err) { - callback(err); - } else { - self.data = data; - self.assumeRoleChaining(paramsArray, callback); - } - } - ); - } - } catch (err) { - callback(err); - } - }, - - /** - * @api private - */ - createClients: function() { - if (!this.service) { - var stsConfig = AWS.util.merge({}, this.clientConfig); - this.service = new STS(stsConfig); - - // Retry in case of IDPCommunicationErrorException or InvalidIdentityToken - this.service.retryableError = function(error) { - if (error.code === 'IDPCommunicationErrorException' || error.code === 'InvalidIdentityToken') { - return true; - } else { - return AWS.Service.prototype.retryableError.call(this, error); - } - }; - } - } -}); - - -/***/ }), - -/***/ 74998: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var STS = __nccwpck_require__(57513); - -/** - * Represents credentials retrieved from STS Web Identity Federation support. - * - * By default this provider gets credentials using the - * {AWS.STS.assumeRoleWithWebIdentity} service operation. This operation - * requires a `RoleArn` containing the ARN of the IAM trust policy for the - * application for which credentials will be given. In addition, the - * `WebIdentityToken` must be set to the token provided by the identity - * provider. See {constructor} for an example on creating a credentials - * object with proper `RoleArn` and `WebIdentityToken` values. - * - * ## Refreshing Credentials from Identity Service - * - * In addition to AWS credentials expiring after a given amount of time, the - * login token from the identity provider will also expire. Once this token - * expires, it will not be usable to refresh AWS credentials, and another - * token will be needed. The SDK does not manage refreshing of the token value, - * but this can be done through a "refresh token" supported by most identity - * providers. Consult the documentation for the identity provider for refreshing - * tokens. Once the refreshed token is acquired, you should make sure to update - * this new token in the credentials object's {params} property. The following - * code will update the WebIdentityToken, assuming you have retrieved an updated - * token from the identity provider: - * - * ```javascript - * AWS.config.credentials.params.WebIdentityToken = updatedToken; - * ``` - * - * Future calls to `credentials.refresh()` will now use the new token. - * - * @!attribute params - * @return [map] the map of params passed to - * {AWS.STS.assumeRoleWithWebIdentity}. To update the token, set the - * `params.WebIdentityToken` property. - * @!attribute data - * @return [map] the raw data response from the call to - * {AWS.STS.assumeRoleWithWebIdentity}. Use this if you want to get - * access to other properties from the response. - */ -AWS.WebIdentityCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * Creates a new credentials object. - * @param (see AWS.STS.assumeRoleWithWebIdentity) - * @example Creating a new credentials object - * AWS.config.credentials = new AWS.WebIdentityCredentials({ - * RoleArn: 'arn:aws:iam::1234567890:role/WebIdentity', - * WebIdentityToken: 'ABCDEFGHIJKLMNOP', // token from identity service - * RoleSessionName: 'web' // optional name, defaults to web-identity - * }, { - * // optionally provide configuration to apply to the underlying AWS.STS service client - * // if configuration is not provided, then configuration will be pulled from AWS.config - * - * // specify timeout options - * httpOptions: { - * timeout: 100 - * } - * }); - * @see AWS.STS.assumeRoleWithWebIdentity - * @see AWS.Config - */ - constructor: function WebIdentityCredentials(params, clientConfig) { - AWS.Credentials.call(this); - this.expired = true; - this.params = params; - this.params.RoleSessionName = this.params.RoleSessionName || 'web-identity'; - this.data = null; - this._clientConfig = AWS.util.copy(clientConfig || {}); - }, - - /** - * Refreshes credentials using {AWS.STS.assumeRoleWithWebIdentity} - * - * @callback callback function(err) - * Called when the STS service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - this.coalesceRefresh(callback || AWS.util.fn.callback); - }, - - /** - * @api private - */ - load: function load(callback) { - var self = this; - self.createClients(); - self.service.assumeRoleWithWebIdentity(function (err, data) { - self.data = null; - if (!err) { - self.data = data; - self.service.credentialsFrom(data, self); - } - callback(err); - }); - }, - - /** - * @api private - */ - createClients: function() { - if (!this.service) { - var stsConfig = AWS.util.merge({}, this._clientConfig); - stsConfig.params = this.params; - this.service = new STS(stsConfig); - } - } - -}); - - -/***/ }), - -/***/ 45313: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var util = __nccwpck_require__(77985); -var endpointDiscoveryEnabledEnvs = ['AWS_ENABLE_ENDPOINT_DISCOVERY', 'AWS_ENDPOINT_DISCOVERY_ENABLED']; - -/** - * Generate key (except resources and operation part) to index the endpoints in the cache - * If input shape has endpointdiscoveryid trait then use - * accessKey + operation + resources + region + service as cache key - * If input shape doesn't have endpointdiscoveryid trait then use - * accessKey + region + service as cache key - * @return [map] object with keys to index endpoints. - * @api private - */ -function getCacheKey(request) { - var service = request.service; - var api = service.api || {}; - var operations = api.operations; - var identifiers = {}; - if (service.config.region) { - identifiers.region = service.config.region; - } - if (api.serviceId) { - identifiers.serviceId = api.serviceId; - } - if (service.config.credentials.accessKeyId) { - identifiers.accessKeyId = service.config.credentials.accessKeyId; - } - return identifiers; -} - -/** - * Recursive helper for marshallCustomIdentifiers(). - * Looks for required string input members that have 'endpointdiscoveryid' trait. - * @api private - */ -function marshallCustomIdentifiersHelper(result, params, shape) { - if (!shape || params === undefined || params === null) return; - if (shape.type === 'structure' && shape.required && shape.required.length > 0) { - util.arrayEach(shape.required, function(name) { - var memberShape = shape.members[name]; - if (memberShape.endpointDiscoveryId === true) { - var locationName = memberShape.isLocationName ? memberShape.name : name; - result[locationName] = String(params[name]); - } else { - marshallCustomIdentifiersHelper(result, params[name], memberShape); - } - }); - } -} - -/** - * Get custom identifiers for cache key. - * Identifies custom identifiers by checking each shape's `endpointDiscoveryId` trait. - * @param [object] request object - * @param [object] input shape of the given operation's api - * @api private - */ -function marshallCustomIdentifiers(request, shape) { - var identifiers = {}; - marshallCustomIdentifiersHelper(identifiers, request.params, shape); - return identifiers; -} - -/** - * Call endpoint discovery operation when it's optional. - * When endpoint is available in cache then use the cached endpoints. If endpoints - * are unavailable then use regional endpoints and call endpoint discovery operation - * asynchronously. This is turned off by default. - * @param [object] request object - * @api private - */ -function optionalDiscoverEndpoint(request) { - var service = request.service; - var api = service.api; - var operationModel = api.operations ? api.operations[request.operation] : undefined; - var inputShape = operationModel ? operationModel.input : undefined; - - var identifiers = marshallCustomIdentifiers(request, inputShape); - var cacheKey = getCacheKey(request); - if (Object.keys(identifiers).length > 0) { - cacheKey = util.update(cacheKey, identifiers); - if (operationModel) cacheKey.operation = operationModel.name; - } - var endpoints = AWS.endpointCache.get(cacheKey); - if (endpoints && endpoints.length === 1 && endpoints[0].Address === '') { - //endpoint operation is being made but response not yet received - //or endpoint operation just failed in 1 minute - return; - } else if (endpoints && endpoints.length > 0) { - //found endpoint record from cache - request.httpRequest.updateEndpoint(endpoints[0].Address); - } else { - //endpoint record not in cache or outdated. make discovery operation - var endpointRequest = service.makeRequest(api.endpointOperation, { - Operation: operationModel.name, - Identifiers: identifiers, - }); - addApiVersionHeader(endpointRequest); - endpointRequest.removeListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS); - endpointRequest.removeListener('retry', AWS.EventListeners.Core.RETRY_CHECK); - //put in a placeholder for endpoints already requested, prevent - //too much in-flight calls - AWS.endpointCache.put(cacheKey, [{ - Address: '', - CachePeriodInMinutes: 1 - }]); - endpointRequest.send(function(err, data) { - if (data && data.Endpoints) { - AWS.endpointCache.put(cacheKey, data.Endpoints); - } else if (err) { - AWS.endpointCache.put(cacheKey, [{ - Address: '', - CachePeriodInMinutes: 1 //not to make more endpoint operation in next 1 minute - }]); - } - }); - } -} - -var requestQueue = {}; - -/** - * Call endpoint discovery operation when it's required. - * When endpoint is available in cache then use cached ones. If endpoints are - * unavailable then SDK should call endpoint operation then use returned new - * endpoint for the api call. SDK will automatically attempt to do endpoint - * discovery. This is turned off by default - * @param [object] request object - * @api private - */ -function requiredDiscoverEndpoint(request, done) { - var service = request.service; - var api = service.api; - var operationModel = api.operations ? api.operations[request.operation] : undefined; - var inputShape = operationModel ? operationModel.input : undefined; - - var identifiers = marshallCustomIdentifiers(request, inputShape); - var cacheKey = getCacheKey(request); - if (Object.keys(identifiers).length > 0) { - cacheKey = util.update(cacheKey, identifiers); - if (operationModel) cacheKey.operation = operationModel.name; - } - var cacheKeyStr = AWS.EndpointCache.getKeyString(cacheKey); - var endpoints = AWS.endpointCache.get(cacheKeyStr); //endpoint cache also accepts string keys - if (endpoints && endpoints.length === 1 && endpoints[0].Address === '') { - //endpoint operation is being made but response not yet received - //push request object to a pending queue - if (!requestQueue[cacheKeyStr]) requestQueue[cacheKeyStr] = []; - requestQueue[cacheKeyStr].push({request: request, callback: done}); - return; - } else if (endpoints && endpoints.length > 0) { - request.httpRequest.updateEndpoint(endpoints[0].Address); - done(); - } else { - var endpointRequest = service.makeRequest(api.endpointOperation, { - Operation: operationModel.name, - Identifiers: identifiers, - }); - endpointRequest.removeListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS); - addApiVersionHeader(endpointRequest); - - //put in a placeholder for endpoints already requested, prevent - //too much in-flight calls - AWS.endpointCache.put(cacheKeyStr, [{ - Address: '', - CachePeriodInMinutes: 60 //long-live cache - }]); - endpointRequest.send(function(err, data) { - if (err) { - request.response.error = util.error(err, { retryable: false }); - AWS.endpointCache.remove(cacheKey); - - //fail all the pending requests in batch - if (requestQueue[cacheKeyStr]) { - var pendingRequests = requestQueue[cacheKeyStr]; - util.arrayEach(pendingRequests, function(requestContext) { - requestContext.request.response.error = util.error(err, { retryable: false }); - requestContext.callback(); - }); - delete requestQueue[cacheKeyStr]; - } - } else if (data) { - AWS.endpointCache.put(cacheKeyStr, data.Endpoints); - request.httpRequest.updateEndpoint(data.Endpoints[0].Address); - - //update the endpoint for all the pending requests in batch - if (requestQueue[cacheKeyStr]) { - var pendingRequests = requestQueue[cacheKeyStr]; - util.arrayEach(pendingRequests, function(requestContext) { - requestContext.request.httpRequest.updateEndpoint(data.Endpoints[0].Address); - requestContext.callback(); - }); - delete requestQueue[cacheKeyStr]; - } - } - done(); - }); - } -} - -/** - * add api version header to endpoint operation - * @api private - */ -function addApiVersionHeader(endpointRequest) { - var api = endpointRequest.service.api; - var apiVersion = api.apiVersion; - if (apiVersion && !endpointRequest.httpRequest.headers['x-amz-api-version']) { - endpointRequest.httpRequest.headers['x-amz-api-version'] = apiVersion; - } -} - -/** - * If api call gets invalid endpoint exception, SDK should attempt to remove the invalid - * endpoint from cache. - * @api private - */ -function invalidateCachedEndpoints(response) { - var error = response.error; - var httpResponse = response.httpResponse; - if (error && - (error.code === 'InvalidEndpointException' || httpResponse.statusCode === 421) - ) { - var request = response.request; - var operations = request.service.api.operations || {}; - var inputShape = operations[request.operation] ? operations[request.operation].input : undefined; - var identifiers = marshallCustomIdentifiers(request, inputShape); - var cacheKey = getCacheKey(request); - if (Object.keys(identifiers).length > 0) { - cacheKey = util.update(cacheKey, identifiers); - if (operations[request.operation]) cacheKey.operation = operations[request.operation].name; - } - AWS.endpointCache.remove(cacheKey); - } -} - -/** - * If endpoint is explicitly configured, SDK should not do endpoint discovery in anytime. - * @param [object] client Service client object. - * @api private - */ -function hasCustomEndpoint(client) { - //if set endpoint is set for specific client, enable endpoint discovery will raise an error. - if (client._originalConfig && client._originalConfig.endpoint && client._originalConfig.endpointDiscoveryEnabled === true) { - throw util.error(new Error(), { - code: 'ConfigurationException', - message: 'Custom endpoint is supplied; endpointDiscoveryEnabled must not be true.' - }); - }; - var svcConfig = AWS.config[client.serviceIdentifier] || {}; - return Boolean(AWS.config.endpoint || svcConfig.endpoint || (client._originalConfig && client._originalConfig.endpoint)); -} - -/** - * @api private - */ -function isFalsy(value) { - return ['false', '0'].indexOf(value) >= 0; -} - -/** - * If endpoint discovery should perform for this request when no operation requires endpoint - * discovery for the given service. - * SDK performs config resolution in order like below: - * 1. If set in client configuration. - * 2. If set in env AWS_ENABLE_ENDPOINT_DISCOVERY. - * 3. If set in shared ini config file with key 'endpoint_discovery_enabled'. - * @param [object] request request object. - * @returns [boolean|undefined] if endpoint discovery config is not set in any source, this - * function returns undefined - * @api private - */ -function resolveEndpointDiscoveryConfig(request) { - var service = request.service || {}; - if (service.config.endpointDiscoveryEnabled !== undefined) { - return service.config.endpointDiscoveryEnabled; - } - - //shared ini file is only available in Node - //not to check env in browser - if (util.isBrowser()) return undefined; - - // If any of recognized endpoint discovery config env is set - for (var i = 0; i < endpointDiscoveryEnabledEnvs.length; i++) { - var env = endpointDiscoveryEnabledEnvs[i]; - if (Object.prototype.hasOwnProperty.call(process.env, env)) { - if (process.env[env] === '' || process.env[env] === undefined) { - throw util.error(new Error(), { - code: 'ConfigurationException', - message: 'environmental variable ' + env + ' cannot be set to nothing' - }); - } - return !isFalsy(process.env[env]); - } - } - - var configFile = {}; - try { - configFile = AWS.util.iniLoader ? AWS.util.iniLoader.loadFrom({ - isConfig: true, - filename: process.env[AWS.util.sharedConfigFileEnv] - }) : {}; - } catch (e) {} - var sharedFileConfig = configFile[ - process.env.AWS_PROFILE || AWS.util.defaultProfile - ] || {}; - if (Object.prototype.hasOwnProperty.call(sharedFileConfig, 'endpoint_discovery_enabled')) { - if (sharedFileConfig.endpoint_discovery_enabled === undefined) { - throw util.error(new Error(), { - code: 'ConfigurationException', - message: 'config file entry \'endpoint_discovery_enabled\' cannot be set to nothing' - }); - } - return !isFalsy(sharedFileConfig.endpoint_discovery_enabled); - } - return undefined; -} - -/** - * attach endpoint discovery logic to request object - * @param [object] request - * @api private - */ -function discoverEndpoint(request, done) { - var service = request.service || {}; - if (hasCustomEndpoint(service) || request.isPresigned()) return done(); - - var operations = service.api.operations || {}; - var operationModel = operations[request.operation]; - var isEndpointDiscoveryRequired = operationModel ? operationModel.endpointDiscoveryRequired : 'NULL'; - var isEnabled = resolveEndpointDiscoveryConfig(request); - var hasRequiredEndpointDiscovery = service.api.hasRequiredEndpointDiscovery; - if (isEnabled || hasRequiredEndpointDiscovery) { - // Once a customer enables endpoint discovery, the SDK should start appending - // the string endpoint-discovery to the user-agent on all requests. - request.httpRequest.appendToUserAgent('endpoint-discovery'); - } - switch (isEndpointDiscoveryRequired) { - case 'OPTIONAL': - if (isEnabled || hasRequiredEndpointDiscovery) { - // For a given service; if at least one operation requires endpoint discovery then the SDK must enable endpoint discovery - // by default for all operations of that service, including operations where endpoint discovery is optional. - optionalDiscoverEndpoint(request); - request.addNamedListener('INVALIDATE_CACHED_ENDPOINTS', 'extractError', invalidateCachedEndpoints); - } - done(); - break; - case 'REQUIRED': - if (isEnabled === false) { - // For a given operation; if endpoint discovery is required and it has been disabled on the SDK client, - // then the SDK must return a clear and actionable exception. - request.response.error = util.error(new Error(), { - code: 'ConfigurationException', - message: 'Endpoint Discovery is disabled but ' + service.api.className + '.' + request.operation + - '() requires it. Please check your configurations.' - }); - done(); - break; - } - request.addNamedListener('INVALIDATE_CACHED_ENDPOINTS', 'extractError', invalidateCachedEndpoints); - requiredDiscoverEndpoint(request, done); - break; - case 'NULL': - default: - done(); - break; - } -} - -module.exports = { - discoverEndpoint: discoverEndpoint, - requiredDiscoverEndpoint: requiredDiscoverEndpoint, - optionalDiscoverEndpoint: optionalDiscoverEndpoint, - marshallCustomIdentifiers: marshallCustomIdentifiers, - getCacheKey: getCacheKey, - invalidateCachedEndpoint: invalidateCachedEndpoints, -}; - - -/***/ }), - -/***/ 76663: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var util = AWS.util; -var typeOf = __nccwpck_require__(48084).typeOf; -var DynamoDBSet = __nccwpck_require__(20304); -var NumberValue = __nccwpck_require__(91593); - -AWS.DynamoDB.Converter = { - /** - * Convert a JavaScript value to its equivalent DynamoDB AttributeValue type - * - * @param data [any] The data to convert to a DynamoDB AttributeValue - * @param options [map] - * @option options convertEmptyValues [Boolean] Whether to automatically - * convert empty strings, blobs, - * and sets to `null` - * @option options wrapNumbers [Boolean] Whether to return numbers as a - * NumberValue object instead of - * converting them to native JavaScript - * numbers. This allows for the safe - * round-trip transport of numbers of - * arbitrary size. - * @return [map] An object in the Amazon DynamoDB AttributeValue format - * - * @see AWS.DynamoDB.Converter.marshall AWS.DynamoDB.Converter.marshall to - * convert entire records (rather than individual attributes) - */ - input: function convertInput(data, options) { - options = options || {}; - var type = typeOf(data); - if (type === 'Object') { - return formatMap(data, options); - } else if (type === 'Array') { - return formatList(data, options); - } else if (type === 'Set') { - return formatSet(data, options); - } else if (type === 'String') { - if (data.length === 0 && options.convertEmptyValues) { - return convertInput(null); - } - return { S: data }; - } else if (type === 'Number' || type === 'NumberValue') { - return { N: data.toString() }; - } else if (type === 'Binary') { - if (data.length === 0 && options.convertEmptyValues) { - return convertInput(null); - } - return { B: data }; - } else if (type === 'Boolean') { - return { BOOL: data }; - } else if (type === 'null') { - return { NULL: true }; - } else if (type !== 'undefined' && type !== 'Function') { - // this value has a custom constructor - return formatMap(data, options); - } - }, - - /** - * Convert a JavaScript object into a DynamoDB record. - * - * @param data [any] The data to convert to a DynamoDB record - * @param options [map] - * @option options convertEmptyValues [Boolean] Whether to automatically - * convert empty strings, blobs, - * and sets to `null` - * @option options wrapNumbers [Boolean] Whether to return numbers as a - * NumberValue object instead of - * converting them to native JavaScript - * numbers. This allows for the safe - * round-trip transport of numbers of - * arbitrary size. - * - * @return [map] An object in the DynamoDB record format. - * - * @example Convert a JavaScript object into a DynamoDB record - * var marshalled = AWS.DynamoDB.Converter.marshall({ - * string: 'foo', - * list: ['fizz', 'buzz', 'pop'], - * map: { - * nestedMap: { - * key: 'value', - * } - * }, - * number: 123, - * nullValue: null, - * boolValue: true, - * stringSet: new DynamoDBSet(['foo', 'bar', 'baz']) - * }); - */ - marshall: function marshallItem(data, options) { - return AWS.DynamoDB.Converter.input(data, options).M; - }, - - /** - * Convert a DynamoDB AttributeValue object to its equivalent JavaScript type. - * - * @param data [map] An object in the Amazon DynamoDB AttributeValue format - * @param options [map] - * @option options convertEmptyValues [Boolean] Whether to automatically - * convert empty strings, blobs, - * and sets to `null` - * @option options wrapNumbers [Boolean] Whether to return numbers as a - * NumberValue object instead of - * converting them to native JavaScript - * numbers. This allows for the safe - * round-trip transport of numbers of - * arbitrary size. - * - * @return [Object|Array|String|Number|Boolean|null] - * - * @see AWS.DynamoDB.Converter.unmarshall AWS.DynamoDB.Converter.unmarshall to - * convert entire records (rather than individual attributes) - */ - output: function convertOutput(data, options) { - options = options || {}; - var list, map, i; - for (var type in data) { - var values = data[type]; - if (type === 'M') { - map = {}; - for (var key in values) { - map[key] = convertOutput(values[key], options); - } - return map; - } else if (type === 'L') { - list = []; - for (i = 0; i < values.length; i++) { - list.push(convertOutput(values[i], options)); - } - return list; - } else if (type === 'SS') { - list = []; - for (i = 0; i < values.length; i++) { - list.push(values[i] + ''); - } - return new DynamoDBSet(list); - } else if (type === 'NS') { - list = []; - for (i = 0; i < values.length; i++) { - list.push(convertNumber(values[i], options.wrapNumbers)); - } - return new DynamoDBSet(list); - } else if (type === 'BS') { - list = []; - for (i = 0; i < values.length; i++) { - list.push(AWS.util.buffer.toBuffer(values[i])); - } - return new DynamoDBSet(list); - } else if (type === 'S') { - return values + ''; - } else if (type === 'N') { - return convertNumber(values, options.wrapNumbers); - } else if (type === 'B') { - return util.buffer.toBuffer(values); - } else if (type === 'BOOL') { - return (values === 'true' || values === 'TRUE' || values === true); - } else if (type === 'NULL') { - return null; - } - } - }, - - /** - * Convert a DynamoDB record into a JavaScript object. - * - * @param data [any] The DynamoDB record - * @param options [map] - * @option options convertEmptyValues [Boolean] Whether to automatically - * convert empty strings, blobs, - * and sets to `null` - * @option options wrapNumbers [Boolean] Whether to return numbers as a - * NumberValue object instead of - * converting them to native JavaScript - * numbers. This allows for the safe - * round-trip transport of numbers of - * arbitrary size. - * - * @return [map] An object whose properties have been converted from - * DynamoDB's AttributeValue format into their corresponding native - * JavaScript types. - * - * @example Convert a record received from a DynamoDB stream - * var unmarshalled = AWS.DynamoDB.Converter.unmarshall({ - * string: {S: 'foo'}, - * list: {L: [{S: 'fizz'}, {S: 'buzz'}, {S: 'pop'}]}, - * map: { - * M: { - * nestedMap: { - * M: { - * key: {S: 'value'} - * } - * } - * } - * }, - * number: {N: '123'}, - * nullValue: {NULL: true}, - * boolValue: {BOOL: true} - * }); - */ - unmarshall: function unmarshall(data, options) { - return AWS.DynamoDB.Converter.output({M: data}, options); - } -}; - -/** - * @api private - * @param data [Array] - * @param options [map] - */ -function formatList(data, options) { - var list = {L: []}; - for (var i = 0; i < data.length; i++) { - list['L'].push(AWS.DynamoDB.Converter.input(data[i], options)); - } - return list; -} - -/** - * @api private - * @param value [String] - * @param wrapNumbers [Boolean] - */ -function convertNumber(value, wrapNumbers) { - return wrapNumbers ? new NumberValue(value) : Number(value); -} - -/** - * @api private - * @param data [map] - * @param options [map] - */ -function formatMap(data, options) { - var map = {M: {}}; - for (var key in data) { - var formatted = AWS.DynamoDB.Converter.input(data[key], options); - if (formatted !== void 0) { - map['M'][key] = formatted; - } - } - return map; -} - -/** - * @api private - */ -function formatSet(data, options) { - options = options || {}; - var values = data.values; - if (options.convertEmptyValues) { - values = filterEmptySetValues(data); - if (values.length === 0) { - return AWS.DynamoDB.Converter.input(null); - } - } - - var map = {}; - switch (data.type) { - case 'String': map['SS'] = values; break; - case 'Binary': map['BS'] = values; break; - case 'Number': map['NS'] = values.map(function (value) { - return value.toString(); - }); - } - return map; -} - -/** - * @api private - */ -function filterEmptySetValues(set) { - var nonEmptyValues = []; - var potentiallyEmptyTypes = { - String: true, - Binary: true, - Number: false - }; - if (potentiallyEmptyTypes[set.type]) { - for (var i = 0; i < set.values.length; i++) { - if (set.values[i].length === 0) { - continue; - } - nonEmptyValues.push(set.values[i]); - } - - return nonEmptyValues; - } - - return set.values; -} - -/** - * @api private - */ -module.exports = AWS.DynamoDB.Converter; - - -/***/ }), - -/***/ 90030: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var Translator = __nccwpck_require__(34222); -var DynamoDBSet = __nccwpck_require__(20304); - -/** - * The document client simplifies working with items in Amazon DynamoDB - * by abstracting away the notion of attribute values. This abstraction - * annotates native JavaScript types supplied as input parameters, as well - * as converts annotated response data to native JavaScript types. - * - * ## Marshalling Input and Unmarshalling Response Data - * - * The document client affords developers the use of native JavaScript types - * instead of `AttributeValue`s to simplify the JavaScript development - * experience with Amazon DynamoDB. JavaScript objects passed in as parameters - * are marshalled into `AttributeValue` shapes required by Amazon DynamoDB. - * Responses from DynamoDB are unmarshalled into plain JavaScript objects - * by the `DocumentClient`. The `DocumentClient`, does not accept - * `AttributeValue`s in favor of native JavaScript types. - * - * | JavaScript Type | DynamoDB AttributeValue | - * |:----------------------------------------------------------------------:|-------------------------| - * | String | S | - * | Number | N | - * | Boolean | BOOL | - * | null | NULL | - * | Array | L | - * | Object | M | - * | Buffer, File, Blob, ArrayBuffer, DataView, and JavaScript typed arrays | B | - * - * ## Support for Sets - * - * The `DocumentClient` offers a convenient way to create sets from - * JavaScript Arrays. The type of set is inferred from the first element - * in the array. DynamoDB supports string, number, and binary sets. To - * learn more about supported types see the - * [Amazon DynamoDB Data Model Documentation](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html) - * For more information see {AWS.DynamoDB.DocumentClient.createSet} - * - */ -AWS.DynamoDB.DocumentClient = AWS.util.inherit({ - - /** - * Creates a DynamoDB document client with a set of configuration options. - * - * @option options params [map] An optional map of parameters to bind to every - * request sent by this service object. - * @option options service [AWS.DynamoDB] An optional pre-configured instance - * of the AWS.DynamoDB service object to use for requests. The object may - * bound parameters used by the document client. - * @option options convertEmptyValues [Boolean] set to true if you would like - * the document client to convert empty values (0-length strings, binary - * buffers, and sets) to be converted to NULL types when persisting to - * DynamoDB. - * @option options wrapNumbers [Boolean] Set to true to return numbers as a - * NumberValue object instead of converting them to native JavaScript numbers. - * This allows for the safe round-trip transport of numbers of arbitrary size. - * @see AWS.DynamoDB.constructor - * - */ - constructor: function DocumentClient(options) { - var self = this; - self.options = options || {}; - self.configure(self.options); - }, - - /** - * @api private - */ - configure: function configure(options) { - var self = this; - self.service = options.service; - self.bindServiceObject(options); - self.attrValue = options.attrValue = - self.service.api.operations.putItem.input.members.Item.value.shape; - }, - - /** - * @api private - */ - bindServiceObject: function bindServiceObject(options) { - var self = this; - options = options || {}; - - if (!self.service) { - self.service = new AWS.DynamoDB(options); - } else { - var config = AWS.util.copy(self.service.config); - self.service = new self.service.constructor.__super__(config); - self.service.config.params = - AWS.util.merge(self.service.config.params || {}, options.params); - } - }, - - /** - * @api private - */ - makeServiceRequest: function(operation, params, callback) { - var self = this; - var request = self.service[operation](params); - self.setupRequest(request); - self.setupResponse(request); - if (typeof callback === 'function') { - request.send(callback); - } - return request; - }, - - /** - * @api private - */ - serviceClientOperationsMap: { - batchGet: 'batchGetItem', - batchWrite: 'batchWriteItem', - delete: 'deleteItem', - get: 'getItem', - put: 'putItem', - query: 'query', - scan: 'scan', - update: 'updateItem', - transactGet: 'transactGetItems', - transactWrite: 'transactWriteItems' - }, - - /** - * Returns the attributes of one or more items from one or more tables - * by delegating to `AWS.DynamoDB.batchGetItem()`. - * - * Supply the same parameters as {AWS.DynamoDB.batchGetItem} with - * `AttributeValue`s substituted by native JavaScript types. - * - * @see AWS.DynamoDB.batchGetItem - * @example Get items from multiple tables - * var params = { - * RequestItems: { - * 'Table-1': { - * Keys: [ - * { - * HashKey: 'haskey', - * NumberRangeKey: 1 - * } - * ] - * }, - * 'Table-2': { - * Keys: [ - * { foo: 'bar' }, - * ] - * } - * } - * }; - * - * var documentClient = new AWS.DynamoDB.DocumentClient(); - * - * documentClient.batchGet(params, function(err, data) { - * if (err) console.log(err); - * else console.log(data); - * }); - * - */ - batchGet: function(params, callback) { - var operation = this.serviceClientOperationsMap['batchGet']; - return this.makeServiceRequest(operation, params, callback); - }, - - /** - * Puts or deletes multiple items in one or more tables by delegating - * to `AWS.DynamoDB.batchWriteItem()`. - * - * Supply the same parameters as {AWS.DynamoDB.batchWriteItem} with - * `AttributeValue`s substituted by native JavaScript types. - * - * @see AWS.DynamoDB.batchWriteItem - * @example Write to and delete from a table - * var params = { - * RequestItems: { - * 'Table-1': [ - * { - * DeleteRequest: { - * Key: { HashKey: 'someKey' } - * } - * }, - * { - * PutRequest: { - * Item: { - * HashKey: 'anotherKey', - * NumAttribute: 1, - * BoolAttribute: true, - * ListAttribute: [1, 'two', false], - * MapAttribute: { foo: 'bar' } - * } - * } - * } - * ] - * } - * }; - * - * var documentClient = new AWS.DynamoDB.DocumentClient(); - * - * documentClient.batchWrite(params, function(err, data) { - * if (err) console.log(err); - * else console.log(data); - * }); - * - */ - batchWrite: function(params, callback) { - var operation = this.serviceClientOperationsMap['batchWrite']; - return this.makeServiceRequest(operation, params, callback); - }, - - /** - * Deletes a single item in a table by primary key by delegating to - * `AWS.DynamoDB.deleteItem()` - * - * Supply the same parameters as {AWS.DynamoDB.deleteItem} with - * `AttributeValue`s substituted by native JavaScript types. - * - * @see AWS.DynamoDB.deleteItem - * @example Delete an item from a table - * var params = { - * TableName : 'Table', - * Key: { - * HashKey: 'hashkey', - * NumberRangeKey: 1 - * } - * }; - * - * var documentClient = new AWS.DynamoDB.DocumentClient(); - * - * documentClient.delete(params, function(err, data) { - * if (err) console.log(err); - * else console.log(data); - * }); - * - */ - delete: function(params, callback) { - var operation = this.serviceClientOperationsMap['delete']; - return this.makeServiceRequest(operation, params, callback); - }, - - /** - * Returns a set of attributes for the item with the given primary key - * by delegating to `AWS.DynamoDB.getItem()`. - * - * Supply the same parameters as {AWS.DynamoDB.getItem} with - * `AttributeValue`s substituted by native JavaScript types. - * - * @see AWS.DynamoDB.getItem - * @example Get an item from a table - * var params = { - * TableName : 'Table', - * Key: { - * HashKey: 'hashkey' - * } - * }; - * - * var documentClient = new AWS.DynamoDB.DocumentClient(); - * - * documentClient.get(params, function(err, data) { - * if (err) console.log(err); - * else console.log(data); - * }); - * - */ - get: function(params, callback) { - var operation = this.serviceClientOperationsMap['get']; - return this.makeServiceRequest(operation, params, callback); - }, - - /** - * Creates a new item, or replaces an old item with a new item by - * delegating to `AWS.DynamoDB.putItem()`. - * - * Supply the same parameters as {AWS.DynamoDB.putItem} with - * `AttributeValue`s substituted by native JavaScript types. - * - * @see AWS.DynamoDB.putItem - * @example Create a new item in a table - * var params = { - * TableName : 'Table', - * Item: { - * HashKey: 'haskey', - * NumAttribute: 1, - * BoolAttribute: true, - * ListAttribute: [1, 'two', false], - * MapAttribute: { foo: 'bar'}, - * NullAttribute: null - * } - * }; - * - * var documentClient = new AWS.DynamoDB.DocumentClient(); - * - * documentClient.put(params, function(err, data) { - * if (err) console.log(err); - * else console.log(data); - * }); - * - */ - put: function(params, callback) { - var operation = this.serviceClientOperationsMap['put']; - return this.makeServiceRequest(operation, params, callback); - }, - - /** - * Edits an existing item's attributes, or adds a new item to the table if - * it does not already exist by delegating to `AWS.DynamoDB.updateItem()`. - * - * Supply the same parameters as {AWS.DynamoDB.updateItem} with - * `AttributeValue`s substituted by native JavaScript types. - * - * @see AWS.DynamoDB.updateItem - * @example Update an item with expressions - * var params = { - * TableName: 'Table', - * Key: { HashKey : 'hashkey' }, - * UpdateExpression: 'set #a = :x + :y', - * ConditionExpression: '#a < :MAX', - * ExpressionAttributeNames: {'#a' : 'Sum'}, - * ExpressionAttributeValues: { - * ':x' : 20, - * ':y' : 45, - * ':MAX' : 100, - * } - * }; - * - * var documentClient = new AWS.DynamoDB.DocumentClient(); - * - * documentClient.update(params, function(err, data) { - * if (err) console.log(err); - * else console.log(data); - * }); - * - */ - update: function(params, callback) { - var operation = this.serviceClientOperationsMap['update']; - return this.makeServiceRequest(operation, params, callback); - }, - - /** - * Returns one or more items and item attributes by accessing every item - * in a table or a secondary index. - * - * Supply the same parameters as {AWS.DynamoDB.scan} with - * `AttributeValue`s substituted by native JavaScript types. - * - * @see AWS.DynamoDB.scan - * @example Scan the table with a filter expression - * var params = { - * TableName : 'Table', - * FilterExpression : 'Year = :this_year', - * ExpressionAttributeValues : {':this_year' : 2015} - * }; - * - * var documentClient = new AWS.DynamoDB.DocumentClient(); - * - * documentClient.scan(params, function(err, data) { - * if (err) console.log(err); - * else console.log(data); - * }); - * - */ - scan: function(params, callback) { - var operation = this.serviceClientOperationsMap['scan']; - return this.makeServiceRequest(operation, params, callback); - }, - - /** - * Directly access items from a table by primary key or a secondary index. - * - * Supply the same parameters as {AWS.DynamoDB.query} with - * `AttributeValue`s substituted by native JavaScript types. - * - * @see AWS.DynamoDB.query - * @example Query an index - * var params = { - * TableName: 'Table', - * IndexName: 'Index', - * KeyConditionExpression: 'HashKey = :hkey and RangeKey > :rkey', - * ExpressionAttributeValues: { - * ':hkey': 'key', - * ':rkey': 2015 - * } - * }; - * - * var documentClient = new AWS.DynamoDB.DocumentClient(); - * - * documentClient.query(params, function(err, data) { - * if (err) console.log(err); - * else console.log(data); - * }); - * - */ - query: function(params, callback) { - var operation = this.serviceClientOperationsMap['query']; - return this.makeServiceRequest(operation, params, callback); - }, - - /** - * Synchronous write operation that groups up to 25 action requests. - * - * Supply the same parameters as {AWS.DynamoDB.transactWriteItems} with - * `AttributeValue`s substituted by native JavaScript types. - * - * @see AWS.DynamoDB.transactWriteItems - * @example Get items from multiple tables - * var params = { - * TransactItems: [{ - * Put: { - * TableName : 'Table0', - * Item: { - * HashKey: 'haskey', - * NumAttribute: 1, - * BoolAttribute: true, - * ListAttribute: [1, 'two', false], - * MapAttribute: { foo: 'bar'}, - * NullAttribute: null - * } - * } - * }, { - * Update: { - * TableName: 'Table1', - * Key: { HashKey : 'hashkey' }, - * UpdateExpression: 'set #a = :x + :y', - * ConditionExpression: '#a < :MAX', - * ExpressionAttributeNames: {'#a' : 'Sum'}, - * ExpressionAttributeValues: { - * ':x' : 20, - * ':y' : 45, - * ':MAX' : 100, - * } - * } - * }] - * }; - * - * documentClient.transactWrite(params, function(err, data) { - * if (err) console.log(err); - * else console.log(data); - * }); - */ - transactWrite: function(params, callback) { - var operation = this.serviceClientOperationsMap['transactWrite']; - return this.makeServiceRequest(operation, params, callback); - }, - - /** - * Atomically retrieves multiple items from one or more tables (but not from indexes) - * in a single account and region. - * - * Supply the same parameters as {AWS.DynamoDB.transactGetItems} with - * `AttributeValue`s substituted by native JavaScript types. - * - * @see AWS.DynamoDB.transactGetItems - * @example Get items from multiple tables - * var params = { - * TransactItems: [{ - * Get: { - * TableName : 'Table0', - * Key: { - * HashKey: 'hashkey0' - * } - * } - * }, { - * Get: { - * TableName : 'Table1', - * Key: { - * HashKey: 'hashkey1' - * } - * } - * }] - * }; - * - * documentClient.transactGet(params, function(err, data) { - * if (err) console.log(err); - * else console.log(data); - * }); - */ - transactGet: function(params, callback) { - var operation = this.serviceClientOperationsMap['transactGet']; - return this.makeServiceRequest(operation, params, callback); - }, - - /** - * Creates a set of elements inferring the type of set from - * the type of the first element. Amazon DynamoDB currently supports - * the number sets, string sets, and binary sets. For more information - * about DynamoDB data types see the documentation on the - * [Amazon DynamoDB Data Model](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModel.DataTypes). - * - * @param list [Array] Collection to represent your DynamoDB Set - * @param options [map] - * * **validate** [Boolean] set to true if you want to validate the type - * of each element in the set. Defaults to `false`. - * @example Creating a number set - * var documentClient = new AWS.DynamoDB.DocumentClient(); - * - * var params = { - * Item: { - * hashkey: 'hashkey' - * numbers: documentClient.createSet([1, 2, 3]); - * } - * }; - * - * documentClient.put(params, function(err, data) { - * if (err) console.log(err); - * else console.log(data); - * }); - * - */ - createSet: function(list, options) { - options = options || {}; - return new DynamoDBSet(list, options); - }, - - /** - * @api private - */ - getTranslator: function() { - return new Translator(this.options); - }, - - /** - * @api private - */ - setupRequest: function setupRequest(request) { - var self = this; - var translator = self.getTranslator(); - var operation = request.operation; - var inputShape = request.service.api.operations[operation].input; - request._events.validate.unshift(function(req) { - req.rawParams = AWS.util.copy(req.params); - req.params = translator.translateInput(req.rawParams, inputShape); - }); - }, - - /** - * @api private - */ - setupResponse: function setupResponse(request) { - var self = this; - var translator = self.getTranslator(); - var outputShape = self.service.api.operations[request.operation].output; - request.on('extractData', function(response) { - response.data = translator.translateOutput(response.data, outputShape); - }); - - var response = request.response; - response.nextPage = function(cb) { - var resp = this; - var req = resp.request; - var config; - var service = req.service; - var operation = req.operation; - try { - config = service.paginationConfig(operation, true); - } catch (e) { resp.error = e; } - - if (!resp.hasNextPage()) { - if (cb) cb(resp.error, null); - else if (resp.error) throw resp.error; - return null; - } - - var params = AWS.util.copy(req.rawParams); - if (!resp.nextPageTokens) { - return cb ? cb(null, null) : null; - } else { - var inputTokens = config.inputToken; - if (typeof inputTokens === 'string') inputTokens = [inputTokens]; - for (var i = 0; i < inputTokens.length; i++) { - params[inputTokens[i]] = resp.nextPageTokens[i]; - } - return self[operation](params, cb); - } - }; - } - -}); - -/** - * @api private - */ -module.exports = AWS.DynamoDB.DocumentClient; - - -/***/ }), - -/***/ 91593: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var util = __nccwpck_require__(28437).util; - -/** - * An object recognizable as a numeric value that stores the underlying number - * as a string. - * - * Intended to be a deserialization target for the DynamoDB Document Client when - * the `wrapNumbers` flag is set. This allows for numeric values that lose - * precision when converted to JavaScript's `number` type. - */ -var DynamoDBNumberValue = util.inherit({ - constructor: function NumberValue(value) { - this.wrapperName = 'NumberValue'; - this.value = value.toString(); - }, - - /** - * Render the underlying value as a number when converting to JSON. - */ - toJSON: function () { - return this.toNumber(); - }, - - /** - * Convert the underlying value to a JavaScript number. - */ - toNumber: function () { - return Number(this.value); - }, - - /** - * Return a string representing the unaltered value provided to the - * constructor. - */ - toString: function () { - return this.value; - } -}); - -/** - * @api private - */ -module.exports = DynamoDBNumberValue; - - -/***/ }), - -/***/ 20304: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var util = __nccwpck_require__(28437).util; -var typeOf = __nccwpck_require__(48084).typeOf; - -/** - * @api private - */ -var memberTypeToSetType = { - 'String': 'String', - 'Number': 'Number', - 'NumberValue': 'Number', - 'Binary': 'Binary' -}; - -/** - * @api private - */ -var DynamoDBSet = util.inherit({ - - constructor: function Set(list, options) { - options = options || {}; - this.wrapperName = 'Set'; - this.initialize(list, options.validate); - }, - - initialize: function(list, validate) { - var self = this; - self.values = [].concat(list); - self.detectType(); - if (validate) { - self.validate(); - } - }, - - detectType: function() { - this.type = memberTypeToSetType[typeOf(this.values[0])]; - if (!this.type) { - throw util.error(new Error(), { - code: 'InvalidSetType', - message: 'Sets can contain string, number, or binary values' - }); - } - }, - - validate: function() { - var self = this; - var length = self.values.length; - var values = self.values; - for (var i = 0; i < length; i++) { - if (memberTypeToSetType[typeOf(values[i])] !== self.type) { - throw util.error(new Error(), { - code: 'InvalidType', - message: self.type + ' Set contains ' + typeOf(values[i]) + ' value' - }); - } - } - }, - - /** - * Render the underlying values only when converting to JSON. - */ - toJSON: function() { - var self = this; - return self.values; - } - -}); - -/** - * @api private - */ -module.exports = DynamoDBSet; - - -/***/ }), - -/***/ 34222: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var util = __nccwpck_require__(28437).util; -var convert = __nccwpck_require__(76663); - -var Translator = function(options) { - options = options || {}; - this.attrValue = options.attrValue; - this.convertEmptyValues = Boolean(options.convertEmptyValues); - this.wrapNumbers = Boolean(options.wrapNumbers); -}; - -Translator.prototype.translateInput = function(value, shape) { - this.mode = 'input'; - return this.translate(value, shape); -}; - -Translator.prototype.translateOutput = function(value, shape) { - this.mode = 'output'; - return this.translate(value, shape); -}; - -Translator.prototype.translate = function(value, shape) { - var self = this; - if (!shape || value === undefined) return undefined; - - if (shape.shape === self.attrValue) { - return convert[self.mode](value, { - convertEmptyValues: self.convertEmptyValues, - wrapNumbers: self.wrapNumbers, - }); - } - switch (shape.type) { - case 'structure': return self.translateStructure(value, shape); - case 'map': return self.translateMap(value, shape); - case 'list': return self.translateList(value, shape); - default: return self.translateScalar(value, shape); - } -}; - -Translator.prototype.translateStructure = function(structure, shape) { - var self = this; - if (structure == null) return undefined; - - var struct = {}; - util.each(structure, function(name, value) { - var memberShape = shape.members[name]; - if (memberShape) { - var result = self.translate(value, memberShape); - if (result !== undefined) struct[name] = result; - } - }); - return struct; -}; - -Translator.prototype.translateList = function(list, shape) { - var self = this; - if (list == null) return undefined; - - var out = []; - util.arrayEach(list, function(value) { - var result = self.translate(value, shape.member); - if (result === undefined) out.push(null); - else out.push(result); - }); - return out; -}; - -Translator.prototype.translateMap = function(map, shape) { - var self = this; - if (map == null) return undefined; - - var out = {}; - util.each(map, function(key, value) { - var result = self.translate(value, shape.value); - if (result === undefined) out[key] = null; - else out[key] = result; - }); - return out; -}; - -Translator.prototype.translateScalar = function(value, shape) { - return shape.toType(value); -}; - -/** - * @api private - */ -module.exports = Translator; - - -/***/ }), - -/***/ 48084: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var util = __nccwpck_require__(28437).util; - -function typeOf(data) { - if (data === null && typeof data === 'object') { - return 'null'; - } else if (data !== undefined && isBinary(data)) { - return 'Binary'; - } else if (data !== undefined && data.constructor) { - return data.wrapperName || util.typeName(data.constructor); - } else if (data !== undefined && typeof data === 'object') { - // this object is the result of Object.create(null), hence the absence of a - // defined constructor - return 'Object'; - } else { - return 'undefined'; - } -} - -function isBinary(data) { - var types = [ - 'Buffer', 'File', 'Blob', 'ArrayBuffer', 'DataView', - 'Int8Array', 'Uint8Array', 'Uint8ClampedArray', - 'Int16Array', 'Uint16Array', 'Int32Array', 'Uint32Array', - 'Float32Array', 'Float64Array' - ]; - if (util.isNode()) { - var Stream = util.stream.Stream; - if (util.Buffer.isBuffer(data) || data instanceof Stream) { - return true; - } - } - - for (var i = 0; i < types.length; i++) { - if (data !== undefined && data.constructor) { - if (util.isType(data, types[i])) return true; - if (util.typeName(data.constructor) === types[i]) return true; - } - } - - return false; -} - -/** - * @api private - */ -module.exports = { - typeOf: typeOf, - isBinary: isBinary -}; - - -/***/ }), - -/***/ 63727: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var eventMessageChunker = __nccwpck_require__(73630).eventMessageChunker; -var parseEvent = __nccwpck_require__(52123).parseEvent; - -function createEventStream(body, parser, model) { - var eventMessages = eventMessageChunker(body); - - var events = []; - - for (var i = 0; i < eventMessages.length; i++) { - events.push(parseEvent(parser, eventMessages[i], model)); - } - - return events; -} - -/** - * @api private - */ -module.exports = { - createEventStream: createEventStream -}; - - -/***/ }), - -/***/ 18518: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var util = __nccwpck_require__(28437).util; -var Transform = __nccwpck_require__(92413).Transform; -var allocBuffer = util.buffer.alloc; - -/** @type {Transform} */ -function EventMessageChunkerStream(options) { - Transform.call(this, options); - - this.currentMessageTotalLength = 0; - this.currentMessagePendingLength = 0; - /** @type {Buffer} */ - this.currentMessage = null; - - /** @type {Buffer} */ - this.messageLengthBuffer = null; -} - -EventMessageChunkerStream.prototype = Object.create(Transform.prototype); - -/** - * - * @param {Buffer} chunk - * @param {string} encoding - * @param {*} callback - */ -EventMessageChunkerStream.prototype._transform = function(chunk, encoding, callback) { - var chunkLength = chunk.length; - var currentOffset = 0; - - while (currentOffset < chunkLength) { - // create new message if necessary - if (!this.currentMessage) { - // working on a new message, determine total length - var bytesRemaining = chunkLength - currentOffset; - // prevent edge case where total length spans 2 chunks - if (!this.messageLengthBuffer) { - this.messageLengthBuffer = allocBuffer(4); - } - var numBytesForTotal = Math.min( - 4 - this.currentMessagePendingLength, // remaining bytes to fill the messageLengthBuffer - bytesRemaining // bytes left in chunk - ); - - chunk.copy( - this.messageLengthBuffer, - this.currentMessagePendingLength, - currentOffset, - currentOffset + numBytesForTotal - ); - - this.currentMessagePendingLength += numBytesForTotal; - currentOffset += numBytesForTotal; - - if (this.currentMessagePendingLength < 4) { - // not enough information to create the current message - break; - } - this.allocateMessage(this.messageLengthBuffer.readUInt32BE(0)); - this.messageLengthBuffer = null; - } - - // write data into current message - var numBytesToWrite = Math.min( - this.currentMessageTotalLength - this.currentMessagePendingLength, // number of bytes left to complete message - chunkLength - currentOffset // number of bytes left in the original chunk - ); - chunk.copy( - this.currentMessage, // target buffer - this.currentMessagePendingLength, // target offset - currentOffset, // chunk offset - currentOffset + numBytesToWrite // chunk end to write - ); - this.currentMessagePendingLength += numBytesToWrite; - currentOffset += numBytesToWrite; - - // check if a message is ready to be pushed - if (this.currentMessageTotalLength && this.currentMessageTotalLength === this.currentMessagePendingLength) { - // push out the message - this.push(this.currentMessage); - // cleanup - this.currentMessage = null; - this.currentMessageTotalLength = 0; - this.currentMessagePendingLength = 0; + else { + return this.send(command, optionsOrCb); } } - - callback(); -}; - -EventMessageChunkerStream.prototype._flush = function(callback) { - if (this.currentMessageTotalLength) { - if (this.currentMessageTotalLength === this.currentMessagePendingLength) { - callback(null, this.currentMessage); - } else { - callback(new Error('Truncated event message received.')); + batchDeleteImage(args, optionsOrCb, cb) { + const command = new BatchDeleteImageCommand_1.BatchDeleteImageCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); } - } else { - callback(); } -}; - -/** - * @param {number} size Size of the message to be allocated. - * @api private - */ -EventMessageChunkerStream.prototype.allocateMessage = function(size) { - if (typeof size !== 'number') { - throw new Error('Attempted to allocate an event message where size was not a number: ' + size); + completeLayerUpload(args, optionsOrCb, cb) { + const command = new CompleteLayerUploadCommand_1.CompleteLayerUploadCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } } - this.currentMessageTotalLength = size; - this.currentMessagePendingLength = 4; - this.currentMessage = allocBuffer(size); - this.currentMessage.writeUInt32BE(size, 0); -}; - -/** - * @api private - */ -module.exports = { - EventMessageChunkerStream: EventMessageChunkerStream -}; - - -/***/ }), - -/***/ 73630: -/***/ ((module) => { - -/** - * Takes in a buffer of event messages and splits them into individual messages. - * @param {Buffer} buffer - * @api private - */ -function eventMessageChunker(buffer) { - /** @type Buffer[] */ - var messages = []; - var offset = 0; - - while (offset < buffer.length) { - var totalLength = buffer.readInt32BE(offset); - - // create new buffer for individual message (shares memory with original) - var message = buffer.slice(offset, totalLength + offset); - // increment offset to it starts at the next message - offset += totalLength; - - messages.push(message); + createRepository(args, optionsOrCb, cb) { + const command = new CreateRepositoryCommand_1.CreateRepositoryCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } } - - return messages; -} - -/** - * @api private - */ -module.exports = { - eventMessageChunker: eventMessageChunker -}; - - -/***/ }), - -/***/ 93773: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var Transform = __nccwpck_require__(92413).Transform; -var parseEvent = __nccwpck_require__(52123).parseEvent; - -/** @type {Transform} */ -function EventUnmarshallerStream(options) { - options = options || {}; - // set output to object mode - options.readableObjectMode = true; - Transform.call(this, options); - this._readableState.objectMode = true; - - this.parser = options.parser; - this.eventStreamModel = options.eventStreamModel; -} - -EventUnmarshallerStream.prototype = Object.create(Transform.prototype); - -/** - * - * @param {Buffer} chunk - * @param {string} encoding - * @param {*} callback - */ -EventUnmarshallerStream.prototype._transform = function(chunk, encoding, callback) { - try { - var event = parseEvent(this.parser, chunk, this.eventStreamModel); - this.push(event); - return callback(); - } catch (err) { - callback(err); + deleteRepository(args, optionsOrCb, cb) { + const command = new DeleteRepositoryCommand_1.DeleteRepositoryCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } } -}; - -/** - * @api private - */ -module.exports = { - EventUnmarshallerStream: EventUnmarshallerStream -}; - - -/***/ }), - -/***/ 48583: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var util = __nccwpck_require__(28437).util; -var toBuffer = util.buffer.toBuffer; - -/** - * A lossless representation of a signed, 64-bit integer. Instances of this - * class may be used in arithmetic expressions as if they were numeric - * primitives, but the binary representation will be preserved unchanged as the - * `bytes` property of the object. The bytes should be encoded as big-endian, - * two's complement integers. - * @param {Buffer} bytes - * - * @api private - */ -function Int64(bytes) { - if (bytes.length !== 8) { - throw new Error('Int64 buffers must be exactly 8 bytes'); + deleteRepositoryPolicy(args, optionsOrCb, cb) { + const command = new DeleteRepositoryPolicyCommand_1.DeleteRepositoryPolicyCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } } - if (!util.Buffer.isBuffer(bytes)) bytes = toBuffer(bytes); - - this.bytes = bytes; -} - -/** - * @param {number} number - * @returns {Int64} - * - * @api private - */ -Int64.fromNumber = function(number) { - if (number > 9223372036854775807 || number < -9223372036854775808) { - throw new Error( - number + ' is too large (or, if negative, too small) to represent as an Int64' - ); + describeImages(args, optionsOrCb, cb) { + const command = new DescribeImagesCommand_1.DescribeImagesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } } - - var bytes = new Uint8Array(8); - for ( - var i = 7, remaining = Math.abs(Math.round(number)); - i > -1 && remaining > 0; - i--, remaining /= 256 - ) { - bytes[i] = remaining; + describeImageTags(args, optionsOrCb, cb) { + const command = new DescribeImageTagsCommand_1.DescribeImageTagsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } } - - if (number < 0) { - negate(bytes); + describeRegistries(args, optionsOrCb, cb) { + const command = new DescribeRegistriesCommand_1.DescribeRegistriesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } } - - return new Int64(bytes); -}; - -/** - * @returns {number} - * - * @api private - */ -Int64.prototype.valueOf = function() { - var bytes = this.bytes.slice(0); - var negative = bytes[0] & 128; - if (negative) { - negate(bytes); + describeRepositories(args, optionsOrCb, cb) { + const command = new DescribeRepositoriesCommand_1.DescribeRepositoriesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } } - - return parseInt(bytes.toString('hex'), 16) * (negative ? -1 : 1); -}; - -Int64.prototype.toString = function() { - return String(this.valueOf()); -}; - -/** - * @param {Buffer} bytes - * - * @api private - */ -function negate(bytes) { - for (var i = 0; i < 8; i++) { - bytes[i] ^= 0xFF; + getAuthorizationToken(args, optionsOrCb, cb) { + const command = new GetAuthorizationTokenCommand_1.GetAuthorizationTokenCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } } - for (var i = 7; i > -1; i--) { - bytes[i]++; - if (bytes[i] !== 0) { - break; + getRegistryCatalogData(args, optionsOrCb, cb) { + const command = new GetRegistryCatalogDataCommand_1.GetRegistryCatalogDataCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + getRepositoryCatalogData(args, optionsOrCb, cb) { + const command = new GetRepositoryCatalogDataCommand_1.GetRepositoryCatalogDataCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + getRepositoryPolicy(args, optionsOrCb, cb) { + const command = new GetRepositoryPolicyCommand_1.GetRepositoryPolicyCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + initiateLayerUpload(args, optionsOrCb, cb) { + const command = new InitiateLayerUploadCommand_1.InitiateLayerUploadCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + listTagsForResource(args, optionsOrCb, cb) { + const command = new ListTagsForResourceCommand_1.ListTagsForResourceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + putImage(args, optionsOrCb, cb) { + const command = new PutImageCommand_1.PutImageCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + putRegistryCatalogData(args, optionsOrCb, cb) { + const command = new PutRegistryCatalogDataCommand_1.PutRegistryCatalogDataCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + putRepositoryCatalogData(args, optionsOrCb, cb) { + const command = new PutRepositoryCatalogDataCommand_1.PutRepositoryCatalogDataCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + setRepositoryPolicy(args, optionsOrCb, cb) { + const command = new SetRepositoryPolicyCommand_1.SetRepositoryPolicyCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + tagResource(args, optionsOrCb, cb) { + const command = new TagResourceCommand_1.TagResourceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + untagResource(args, optionsOrCb, cb) { + const command = new UntagResourceCommand_1.UntagResourceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + uploadLayerPart(args, optionsOrCb, cb) { + const command = new UploadLayerPartCommand_1.UploadLayerPartCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); } } } - -/** - * @api private - */ -module.exports = { - Int64: Int64 -}; - - -/***/ }), - -/***/ 52123: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var parseMessage = __nccwpck_require__(30866).parseMessage; - -/** - * - * @param {*} parser - * @param {Buffer} message - * @param {*} shape - * @api private - */ -function parseEvent(parser, message, shape) { - var parsedMessage = parseMessage(message); - - // check if message is an event or error - var messageType = parsedMessage.headers[':message-type']; - if (messageType) { - if (messageType.value === 'error') { - throw parseError(parsedMessage); - } else if (messageType.value !== 'event') { - // not sure how to parse non-events/non-errors, ignore for now - return; - } - } - - // determine event type - var eventType = parsedMessage.headers[':event-type']; - // check that the event type is modeled - var eventModel = shape.members[eventType.value]; - if (!eventModel) { - return; - } - - var result = {}; - // check if an event payload exists - var eventPayloadMemberName = eventModel.eventPayloadMemberName; - if (eventPayloadMemberName) { - var payloadShape = eventModel.members[eventPayloadMemberName]; - // if the shape is binary, return the byte array - if (payloadShape.type === 'binary') { - result[eventPayloadMemberName] = parsedMessage.body; - } else { - result[eventPayloadMemberName] = parser.parse(parsedMessage.body.toString(), payloadShape); - } - } - - // read event headers - var eventHeaderNames = eventModel.eventHeaderMemberNames; - for (var i = 0; i < eventHeaderNames.length; i++) { - var name = eventHeaderNames[i]; - if (parsedMessage.headers[name]) { - // parse the header! - result[name] = eventModel.members[name].toType(parsedMessage.headers[name].value); - } - } - - var output = {}; - output[eventType.value] = result; - return output; -} - -function parseError(message) { - var errorCode = message.headers[':error-code']; - var errorMessage = message.headers[':error-message']; - var error = new Error(errorMessage.value || errorMessage); - error.code = error.name = errorCode.value || errorCode; - return error; -} - -/** - * @api private - */ -module.exports = { - parseEvent: parseEvent -}; - - -/***/ }), - -/***/ 30866: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var Int64 = __nccwpck_require__(48583).Int64; - -var splitMessage = __nccwpck_require__(71765).splitMessage; - -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'; - -/** - * @api private - * - * @param {Buffer} headers - */ -function parseHeaders(headers) { - var out = {}; - var position = 0; - while (position < headers.length) { - var nameLength = headers.readUInt8(position++); - var name = headers.slice(position, position + nameLength).toString(); - position += nameLength; - switch (headers.readUInt8(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.readInt8(position++) - }; - break; - case 3 /* short */: - out[name] = { - type: SHORT_TAG, - value: headers.readInt16BE(position) - }; - position += 2; - break; - case 4 /* integer */: - out[name] = { - type: INT_TAG, - value: headers.readInt32BE(position) - }; - position += 4; - break; - case 5 /* long */: - out[name] = { - type: LONG_TAG, - value: new Int64(headers.slice(position, position + 8)) - }; - position += 8; - break; - case 6 /* byteArray */: - var binaryLength = headers.readUInt16BE(position); - position += 2; - out[name] = { - type: BINARY_TAG, - value: headers.slice(position, position + binaryLength) - }; - position += binaryLength; - break; - case 7 /* string */: - var stringLength = headers.readUInt16BE(position); - position += 2; - out[name] = { - type: STRING_TAG, - value: headers.slice( - position, - position + stringLength - ).toString() - }; - position += stringLength; - break; - case 8 /* timestamp */: - out[name] = { - type: TIMESTAMP_TAG, - value: new Date( - new Int64(headers.slice(position, position + 8)) - .valueOf() - ) - }; - position += 8; - break; - case 9 /* uuid */: - var uuidChars = headers.slice(position, position + 16) - .toString('hex'); - position += 16; - out[name] = { - type: UUID_TAG, - value: uuidChars.substr(0, 8) + '-' + - uuidChars.substr(8, 4) + '-' + - uuidChars.substr(12, 4) + '-' + - uuidChars.substr(16, 4) + '-' + - uuidChars.substr(20) - }; - break; - default: - throw new Error('Unrecognized header type tag'); - } - } - return out; -} - -function parseMessage(message) { - var parsed = splitMessage(message); - return { headers: parseHeaders(parsed.headers), body: parsed.body }; -} - -/** - * @api private - */ -module.exports = { - parseMessage: parseMessage -}; - - -/***/ }), - -/***/ 71765: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var util = __nccwpck_require__(28437).util; -var toBuffer = util.buffer.toBuffer; - -// All prelude components are unsigned, 32-bit integers -var PRELUDE_MEMBER_LENGTH = 4; -// The prelude consists of two components -var PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2; -// Checksums are always CRC32 hashes. -var CHECKSUM_LENGTH = 4; -// Messages must include a full prelude, a prelude checksum, and a message checksum -var MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2; - -/** - * @api private - * - * @param {Buffer} message - */ -function splitMessage(message) { - if (!util.Buffer.isBuffer(message)) message = toBuffer(message); - - if (message.length < MINIMUM_MESSAGE_LENGTH) { - throw new Error('Provided message too short to accommodate event stream message overhead'); - } - - if (message.length !== message.readUInt32BE(0)) { - throw new Error('Reported message length does not match received message length'); - } - - var expectedPreludeChecksum = message.readUInt32BE(PRELUDE_LENGTH); - - if ( - expectedPreludeChecksum !== util.crypto.crc32( - message.slice(0, PRELUDE_LENGTH) - ) - ) { - throw new Error( - 'The prelude checksum specified in the message (' + - expectedPreludeChecksum + - ') does not match the calculated CRC32 checksum.' - ); - } - - var expectedMessageChecksum = message.readUInt32BE(message.length - CHECKSUM_LENGTH); - - if ( - expectedMessageChecksum !== util.crypto.crc32( - message.slice(0, message.length - CHECKSUM_LENGTH) - ) - ) { - throw new Error( - 'The message checksum did not match the expected value of ' + - expectedMessageChecksum - ); - } - - var headersStart = PRELUDE_LENGTH + CHECKSUM_LENGTH; - var headersEnd = headersStart + message.readUInt32BE(PRELUDE_MEMBER_LENGTH); - - return { - headers: message.slice(headersStart, headersEnd), - body: message.slice(headersEnd, message.length - CHECKSUM_LENGTH), - }; -} - -/** - * @api private - */ -module.exports = { - splitMessage: splitMessage -}; - - -/***/ }), - -/***/ 69643: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/** - * What is necessary to create an event stream in node? - * - http response stream - * - parser - * - event stream model - */ - -var EventMessageChunkerStream = __nccwpck_require__(18518).EventMessageChunkerStream; -var EventUnmarshallerStream = __nccwpck_require__(93773).EventUnmarshallerStream; - -function createEventStream(stream, parser, model) { - var eventStream = new EventUnmarshallerStream({ - parser: parser, - eventStreamModel: model - }); - - var eventMessageChunker = new EventMessageChunkerStream(); - - stream.pipe( - eventMessageChunker - ).pipe(eventStream); - - stream.on('error', function(err) { - eventMessageChunker.emit('error', err); - }); - - eventMessageChunker.on('error', function(err) { - eventStream.emit('error', err); - }); - - return eventStream; -} - -/** - * @api private - */ -module.exports = { - createEventStream: createEventStream -}; - - -/***/ }), - -/***/ 54995: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var SequentialExecutor = __nccwpck_require__(55948); -var DISCOVER_ENDPOINT = __nccwpck_require__(45313).discoverEndpoint; -/** - * The namespace used to register global event listeners for request building - * and sending. - */ -AWS.EventListeners = { - /** - * @!attribute VALIDATE_CREDENTIALS - * A request listener that validates whether the request is being - * sent with credentials. - * Handles the {AWS.Request~validate 'validate' Request event} - * @example Sending a request without validating credentials - * var listener = AWS.EventListeners.Core.VALIDATE_CREDENTIALS; - * request.removeListener('validate', listener); - * @readonly - * @return [Function] - * @!attribute VALIDATE_REGION - * A request listener that validates whether the region is set - * for a request. - * Handles the {AWS.Request~validate 'validate' Request event} - * @example Sending a request without validating region configuration - * var listener = AWS.EventListeners.Core.VALIDATE_REGION; - * request.removeListener('validate', listener); - * @readonly - * @return [Function] - * @!attribute VALIDATE_PARAMETERS - * A request listener that validates input parameters in a request. - * Handles the {AWS.Request~validate 'validate' Request event} - * @example Sending a request without validating parameters - * var listener = AWS.EventListeners.Core.VALIDATE_PARAMETERS; - * request.removeListener('validate', listener); - * @example Disable parameter validation globally - * AWS.EventListeners.Core.removeListener('validate', - * AWS.EventListeners.Core.VALIDATE_REGION); - * @readonly - * @return [Function] - * @!attribute SEND - * A request listener that initiates the HTTP connection for a - * request being sent. Handles the {AWS.Request~send 'send' Request event} - * @example Replacing the HTTP handler - * var listener = AWS.EventListeners.Core.SEND; - * request.removeListener('send', listener); - * request.on('send', function(response) { - * customHandler.send(response); - * }); - * @return [Function] - * @readonly - * @!attribute HTTP_DATA - * A request listener that reads data from the HTTP connection in order - * to build the response data. - * Handles the {AWS.Request~httpData 'httpData' Request event}. - * Remove this handler if you are overriding the 'httpData' event and - * do not want extra data processing and buffering overhead. - * @example Disabling default data processing - * var listener = AWS.EventListeners.Core.HTTP_DATA; - * request.removeListener('httpData', listener); - * @return [Function] - * @readonly - */ - Core: {} /* doc hack */ -}; - -/** - * @api private - */ -function getOperationAuthtype(req) { - if (!req.service.api.operations) { - return ''; - } - var operation = req.service.api.operations[req.operation]; - return operation ? operation.authtype : ''; -} - -AWS.EventListeners = { - Core: new SequentialExecutor().addNamedListeners(function(add, addAsync) { - addAsync('VALIDATE_CREDENTIALS', 'validate', - function VALIDATE_CREDENTIALS(req, done) { - if (!req.service.api.signatureVersion && !req.service.config.signatureVersion) return done(); // none - req.service.config.getCredentials(function(err) { - if (err) { - req.response.error = AWS.util.error(err, - {code: 'CredentialsError', message: 'Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1'}); - } - done(); - }); - }); - - add('VALIDATE_REGION', 'validate', function VALIDATE_REGION(req) { - if (!req.service.isGlobalEndpoint) { - var dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/); - if (!req.service.config.region) { - req.response.error = AWS.util.error(new Error(), - {code: 'ConfigError', message: 'Missing region in config'}); - } else if (!dnsHostRegex.test(req.service.config.region)) { - req.response.error = AWS.util.error(new Error(), - {code: 'ConfigError', message: 'Invalid region in config'}); - } - } - }); - - add('BUILD_IDEMPOTENCY_TOKENS', 'validate', function BUILD_IDEMPOTENCY_TOKENS(req) { - if (!req.service.api.operations) { - return; - } - var operation = req.service.api.operations[req.operation]; - if (!operation) { - return; - } - var idempotentMembers = operation.idempotentMembers; - if (!idempotentMembers.length) { - return; - } - // creates a copy of params so user's param object isn't mutated - var params = AWS.util.copy(req.params); - for (var i = 0, iLen = idempotentMembers.length; i < iLen; i++) { - if (!params[idempotentMembers[i]]) { - // add the member - params[idempotentMembers[i]] = AWS.util.uuid.v4(); - } - } - req.params = params; - }); - - add('VALIDATE_PARAMETERS', 'validate', function VALIDATE_PARAMETERS(req) { - if (!req.service.api.operations) { - return; - } - var rules = req.service.api.operations[req.operation].input; - var validation = req.service.config.paramValidation; - new AWS.ParamValidator(validation).validate(rules, req.params); - }); - - add('COMPUTE_CHECKSUM', 'afterBuild', function COMPUTE_CHECKSUM(req) { - if (!req.service.api.operations) { - return; - } - var operation = req.service.api.operations[req.operation]; - if (!operation) { - return; - } - var body = req.httpRequest.body; - var isNonStreamingPayload = body && (AWS.util.Buffer.isBuffer(body) || typeof body === 'string'); - var headers = req.httpRequest.headers; - if ( - operation.httpChecksumRequired && - req.service.config.computeChecksums && - isNonStreamingPayload && - !headers['Content-MD5'] - ) { - var md5 = AWS.util.crypto.md5(body, 'base64'); - headers['Content-MD5'] = md5; - } - }); - - addAsync('COMPUTE_SHA256', 'afterBuild', function COMPUTE_SHA256(req, done) { - req.haltHandlersOnError(); - if (!req.service.api.operations) { - return; - } - var operation = req.service.api.operations[req.operation]; - var authtype = operation ? operation.authtype : ''; - if (!req.service.api.signatureVersion && !authtype && !req.service.config.signatureVersion) return done(); // none - if (req.service.getSignerClass(req) === AWS.Signers.V4) { - var body = req.httpRequest.body || ''; - if (authtype.indexOf('unsigned-body') >= 0) { - req.httpRequest.headers['X-Amz-Content-Sha256'] = 'UNSIGNED-PAYLOAD'; - return done(); - } - AWS.util.computeSha256(body, function(err, sha) { - if (err) { - done(err); - } - else { - req.httpRequest.headers['X-Amz-Content-Sha256'] = sha; - done(); - } - }); - } else { - done(); - } - }); - - add('SET_CONTENT_LENGTH', 'afterBuild', function SET_CONTENT_LENGTH(req) { - var authtype = getOperationAuthtype(req); - var payloadMember = AWS.util.getRequestPayloadShape(req); - if (req.httpRequest.headers['Content-Length'] === undefined) { - try { - var length = AWS.util.string.byteLength(req.httpRequest.body); - req.httpRequest.headers['Content-Length'] = length; - } catch (err) { - if (payloadMember && payloadMember.isStreaming) { - if (payloadMember.requiresLength) { - //streaming payload requires length(s3, glacier) - throw err; - } else if (authtype.indexOf('unsigned-body') >= 0) { - //unbounded streaming payload(lex, mediastore) - req.httpRequest.headers['Transfer-Encoding'] = 'chunked'; - return; - } else { - throw err; - } - } - throw err; - } - } - }); - - add('SET_HTTP_HOST', 'afterBuild', function SET_HTTP_HOST(req) { - req.httpRequest.headers['Host'] = req.httpRequest.endpoint.host; - }); - - add('RESTART', 'restart', function RESTART() { - var err = this.response.error; - if (!err || !err.retryable) return; - - this.httpRequest = new AWS.HttpRequest( - this.service.endpoint, - this.service.region - ); - - if (this.response.retryCount < this.service.config.maxRetries) { - this.response.retryCount++; - } else { - this.response.error = null; - } - }); - - var addToHead = true; - addAsync('DISCOVER_ENDPOINT', 'sign', DISCOVER_ENDPOINT, addToHead); - - addAsync('SIGN', 'sign', function SIGN(req, done) { - var service = req.service; - var operations = req.service.api.operations || {}; - var operation = operations[req.operation]; - var authtype = operation ? operation.authtype : ''; - if (!service.api.signatureVersion && !authtype && !service.config.signatureVersion) return done(); // none - - service.config.getCredentials(function (err, credentials) { - if (err) { - req.response.error = err; - return done(); - } - - try { - var date = service.getSkewCorrectedDate(); - var SignerClass = service.getSignerClass(req); - var signer = new SignerClass(req.httpRequest, - service.getSigningName(req), - { - signatureCache: service.config.signatureCache, - operation: operation, - signatureVersion: service.api.signatureVersion - }); - signer.setServiceClientId(service._clientId); - - // clear old authorization headers - delete req.httpRequest.headers['Authorization']; - delete req.httpRequest.headers['Date']; - delete req.httpRequest.headers['X-Amz-Date']; - - // add new authorization - signer.addAuthorization(credentials, date); - req.signedAt = date; - } catch (e) { - req.response.error = e; - } - done(); - }); - }); - - add('VALIDATE_RESPONSE', 'validateResponse', function VALIDATE_RESPONSE(resp) { - if (this.service.successfulResponse(resp, this)) { - resp.data = {}; - resp.error = null; - } else { - resp.data = null; - resp.error = AWS.util.error(new Error(), - {code: 'UnknownError', message: 'An unknown error occurred.'}); - } - }); - - addAsync('SEND', 'send', function SEND(resp, done) { - resp.httpResponse._abortCallback = done; - resp.error = null; - resp.data = null; - - function callback(httpResp) { - resp.httpResponse.stream = httpResp; - var stream = resp.request.httpRequest.stream; - var service = resp.request.service; - var api = service.api; - var operationName = resp.request.operation; - var operation = api.operations[operationName] || {}; - - httpResp.on('headers', function onHeaders(statusCode, headers, statusMessage) { - resp.request.emit( - 'httpHeaders', - [statusCode, headers, resp, statusMessage] - ); - - if (!resp.httpResponse.streaming) { - if (AWS.HttpClient.streamsApiVersion === 2) { // streams2 API check - // if we detect event streams, we're going to have to - // return the stream immediately - if (operation.hasEventOutput && service.successfulResponse(resp)) { - // skip reading the IncomingStream - resp.request.emit('httpDone'); - done(); - return; - } - - httpResp.on('readable', function onReadable() { - var data = httpResp.read(); - if (data !== null) { - resp.request.emit('httpData', [data, resp]); - } - }); - } else { // legacy streams API - httpResp.on('data', function onData(data) { - resp.request.emit('httpData', [data, resp]); - }); - } - } - }); - - httpResp.on('end', function onEnd() { - if (!stream || !stream.didCallback) { - if (AWS.HttpClient.streamsApiVersion === 2 && (operation.hasEventOutput && service.successfulResponse(resp))) { - // don't concatenate response chunks when streaming event stream data when response is successful - return; - } - resp.request.emit('httpDone'); - done(); - } - }); - } - - function progress(httpResp) { - httpResp.on('sendProgress', function onSendProgress(value) { - resp.request.emit('httpUploadProgress', [value, resp]); - }); - - httpResp.on('receiveProgress', function onReceiveProgress(value) { - resp.request.emit('httpDownloadProgress', [value, resp]); - }); - } - - function error(err) { - if (err.code !== 'RequestAbortedError') { - var errCode = err.code === 'TimeoutError' ? err.code : 'NetworkingError'; - err = AWS.util.error(err, { - code: errCode, - region: resp.request.httpRequest.region, - hostname: resp.request.httpRequest.endpoint.hostname, - retryable: true - }); - } - resp.error = err; - resp.request.emit('httpError', [resp.error, resp], function() { - done(); - }); - } - - function executeSend() { - var http = AWS.HttpClient.getInstance(); - var httpOptions = resp.request.service.config.httpOptions || {}; - try { - var stream = http.handleRequest(resp.request.httpRequest, httpOptions, - callback, error); - progress(stream); - } catch (err) { - error(err); - } - } - var timeDiff = (resp.request.service.getSkewCorrectedDate() - this.signedAt) / 1000; - if (timeDiff >= 60 * 10) { // if we signed 10min ago, re-sign - this.emit('sign', [this], function(err) { - if (err) done(err); - else executeSend(); - }); - } else { - executeSend(); - } - }); - - add('HTTP_HEADERS', 'httpHeaders', - function HTTP_HEADERS(statusCode, headers, resp, statusMessage) { - resp.httpResponse.statusCode = statusCode; - resp.httpResponse.statusMessage = statusMessage; - resp.httpResponse.headers = headers; - resp.httpResponse.body = AWS.util.buffer.toBuffer(''); - resp.httpResponse.buffers = []; - resp.httpResponse.numBytes = 0; - var dateHeader = headers.date || headers.Date; - var service = resp.request.service; - if (dateHeader) { - var serverTime = Date.parse(dateHeader); - if (service.config.correctClockSkew - && service.isClockSkewed(serverTime)) { - service.applyClockOffset(serverTime); - } - } - }); - - add('HTTP_DATA', 'httpData', function HTTP_DATA(chunk, resp) { - if (chunk) { - if (AWS.util.isNode()) { - resp.httpResponse.numBytes += chunk.length; - - var total = resp.httpResponse.headers['content-length']; - var progress = { loaded: resp.httpResponse.numBytes, total: total }; - resp.request.emit('httpDownloadProgress', [progress, resp]); - } - - resp.httpResponse.buffers.push(AWS.util.buffer.toBuffer(chunk)); - } - }); - - add('HTTP_DONE', 'httpDone', function HTTP_DONE(resp) { - // convert buffers array into single buffer - if (resp.httpResponse.buffers && resp.httpResponse.buffers.length > 0) { - var body = AWS.util.buffer.concat(resp.httpResponse.buffers); - resp.httpResponse.body = body; - } - delete resp.httpResponse.numBytes; - delete resp.httpResponse.buffers; - }); - - add('FINALIZE_ERROR', 'retry', function FINALIZE_ERROR(resp) { - if (resp.httpResponse.statusCode) { - resp.error.statusCode = resp.httpResponse.statusCode; - if (resp.error.retryable === undefined) { - resp.error.retryable = this.service.retryableError(resp.error, this); - } - } - }); - - add('INVALIDATE_CREDENTIALS', 'retry', function INVALIDATE_CREDENTIALS(resp) { - if (!resp.error) return; - switch (resp.error.code) { - case 'RequestExpired': // EC2 only - case 'ExpiredTokenException': - case 'ExpiredToken': - resp.error.retryable = true; - resp.request.service.config.credentials.expired = true; - } - }); - - add('EXPIRED_SIGNATURE', 'retry', function EXPIRED_SIGNATURE(resp) { - var err = resp.error; - if (!err) return; - if (typeof err.code === 'string' && typeof err.message === 'string') { - if (err.code.match(/Signature/) && err.message.match(/expired/)) { - resp.error.retryable = true; - } - } - }); - - add('CLOCK_SKEWED', 'retry', function CLOCK_SKEWED(resp) { - if (!resp.error) return; - if (this.service.clockSkewError(resp.error) - && this.service.config.correctClockSkew) { - resp.error.retryable = true; - } - }); - - add('REDIRECT', 'retry', function REDIRECT(resp) { - if (resp.error && resp.error.statusCode >= 300 && - resp.error.statusCode < 400 && resp.httpResponse.headers['location']) { - this.httpRequest.endpoint = - new AWS.Endpoint(resp.httpResponse.headers['location']); - this.httpRequest.headers['Host'] = this.httpRequest.endpoint.host; - resp.error.redirect = true; - resp.error.retryable = true; - } - }); - - add('RETRY_CHECK', 'retry', function RETRY_CHECK(resp) { - if (resp.error) { - if (resp.error.redirect && resp.redirectCount < resp.maxRedirects) { - resp.error.retryDelay = 0; - } else if (resp.retryCount < resp.maxRetries) { - resp.error.retryDelay = this.service.retryDelays(resp.retryCount, resp.error) || 0; - } - } - }); - - addAsync('RESET_RETRY_STATE', 'afterRetry', function RESET_RETRY_STATE(resp, done) { - var delay, willRetry = false; - - if (resp.error) { - delay = resp.error.retryDelay || 0; - if (resp.error.retryable && resp.retryCount < resp.maxRetries) { - resp.retryCount++; - willRetry = true; - } else if (resp.error.redirect && resp.redirectCount < resp.maxRedirects) { - resp.redirectCount++; - willRetry = true; - } - } - - // delay < 0 is a signal from customBackoff to skip retries - if (willRetry && delay >= 0) { - resp.error = null; - setTimeout(done, delay); - } else { - done(); - } - }); - }), - - CorePost: new SequentialExecutor().addNamedListeners(function(add) { - add('EXTRACT_REQUEST_ID', 'extractData', AWS.util.extractRequestId); - add('EXTRACT_REQUEST_ID', 'extractError', AWS.util.extractRequestId); - - add('ENOTFOUND_ERROR', 'httpError', function ENOTFOUND_ERROR(err) { - function isDNSError(err) { - return err.errno === 'ENOTFOUND' || - typeof err.errno === 'number' && - typeof AWS.util.getSystemErrorName === 'function' && - ['EAI_NONAME', 'EAI_NODATA'].indexOf(AWS.util.getSystemErrorName(err.errno) >= 0); - } - if (err.code === 'NetworkingError' && isDNSError(err)) { - var message = 'Inaccessible host: `' + err.hostname + '\' at port `' + err.port + - '\'. This service may not be available in the `' + err.region + - '\' region.'; - this.response.error = AWS.util.error(new Error(message), { - code: 'UnknownEndpoint', - region: err.region, - hostname: err.hostname, - retryable: true, - originalError: err - }); - } - }); - }), - - Logger: new SequentialExecutor().addNamedListeners(function(add) { - add('LOG_REQUEST', 'complete', function LOG_REQUEST(resp) { - var req = resp.request; - var logger = req.service.config.logger; - if (!logger) return; - function filterSensitiveLog(inputShape, shape) { - if (!shape) { - return shape; - } - if (inputShape.isSensitive) { - return '***SensitiveInformation***'; - } - switch (inputShape.type) { - case 'structure': - var struct = {}; - AWS.util.each(shape, function(subShapeName, subShape) { - if (Object.prototype.hasOwnProperty.call(inputShape.members, subShapeName)) { - struct[subShapeName] = filterSensitiveLog(inputShape.members[subShapeName], subShape); - } else { - struct[subShapeName] = subShape; - } - }); - return struct; - case 'list': - var list = []; - AWS.util.arrayEach(shape, function(subShape, index) { - list.push(filterSensitiveLog(inputShape.member, subShape)); - }); - return list; - case 'map': - var map = {}; - AWS.util.each(shape, function(key, value) { - map[key] = filterSensitiveLog(inputShape.value, value); - }); - return map; - default: - return shape; - } - } - - function buildMessage() { - var time = resp.request.service.getSkewCorrectedDate().getTime(); - var delta = (time - req.startTime.getTime()) / 1000; - var ansi = logger.isTTY ? true : false; - var status = resp.httpResponse.statusCode; - var censoredParams = req.params; - if ( - req.service.api.operations && - req.service.api.operations[req.operation] && - req.service.api.operations[req.operation].input - ) { - var inputShape = req.service.api.operations[req.operation].input; - censoredParams = filterSensitiveLog(inputShape, req.params); - } - var params = __nccwpck_require__(31669).inspect(censoredParams, true, null); - var message = ''; - if (ansi) message += '\x1B[33m'; - message += '[AWS ' + req.service.serviceIdentifier + ' ' + status; - message += ' ' + delta.toString() + 's ' + resp.retryCount + ' retries]'; - if (ansi) message += '\x1B[0;1m'; - message += ' ' + AWS.util.string.lowerFirst(req.operation); - message += '(' + params + ')'; - if (ansi) message += '\x1B[0m'; - return message; - } - - var line = buildMessage(); - if (typeof logger.log === 'function') { - logger.log(line); - } else if (typeof logger.write === 'function') { - logger.write(line + '\n'); - } - }); - }), - - Json: new SequentialExecutor().addNamedListeners(function(add) { - var svc = __nccwpck_require__(30083); - add('BUILD', 'build', svc.buildRequest); - add('EXTRACT_DATA', 'extractData', svc.extractData); - add('EXTRACT_ERROR', 'extractError', svc.extractError); - }), - - Rest: new SequentialExecutor().addNamedListeners(function(add) { - var svc = __nccwpck_require__(98200); - add('BUILD', 'build', svc.buildRequest); - add('EXTRACT_DATA', 'extractData', svc.extractData); - add('EXTRACT_ERROR', 'extractError', svc.extractError); - }), - - RestJson: new SequentialExecutor().addNamedListeners(function(add) { - var svc = __nccwpck_require__(5883); - add('BUILD', 'build', svc.buildRequest); - add('EXTRACT_DATA', 'extractData', svc.extractData); - add('EXTRACT_ERROR', 'extractError', svc.extractError); - }), - - RestXml: new SequentialExecutor().addNamedListeners(function(add) { - var svc = __nccwpck_require__(15143); - add('BUILD', 'build', svc.buildRequest); - add('EXTRACT_DATA', 'extractData', svc.extractData); - add('EXTRACT_ERROR', 'extractError', svc.extractError); - }), - - Query: new SequentialExecutor().addNamedListeners(function(add) { - var svc = __nccwpck_require__(90761); - add('BUILD', 'build', svc.buildRequest); - add('EXTRACT_DATA', 'extractData', svc.extractData); - add('EXTRACT_ERROR', 'extractError', svc.extractError); - }) -}; - - -/***/ }), - -/***/ 1556: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var inherit = AWS.util.inherit; - -/** - * The endpoint that a service will talk to, for example, - * `'https://ec2.ap-southeast-1.amazonaws.com'`. If - * you need to override an endpoint for a service, you can - * set the endpoint on a service by passing the endpoint - * object with the `endpoint` option key: - * - * ```javascript - * var ep = new AWS.Endpoint('awsproxy.example.com'); - * var s3 = new AWS.S3({endpoint: ep}); - * s3.service.endpoint.hostname == 'awsproxy.example.com' - * ``` - * - * Note that if you do not specify a protocol, the protocol will - * be selected based on your current {AWS.config} configuration. - * - * @!attribute protocol - * @return [String] the protocol (http or https) of the endpoint - * URL - * @!attribute hostname - * @return [String] the host portion of the endpoint, e.g., - * example.com - * @!attribute host - * @return [String] the host portion of the endpoint including - * the port, e.g., example.com:80 - * @!attribute port - * @return [Integer] the port of the endpoint - * @!attribute href - * @return [String] the full URL of the endpoint - */ -AWS.Endpoint = inherit({ - - /** - * @overload Endpoint(endpoint) - * Constructs a new endpoint given an endpoint URL. If the - * URL omits a protocol (http or https), the default protocol - * set in the global {AWS.config} will be used. - * @param endpoint [String] the URL to construct an endpoint from - */ - constructor: function Endpoint(endpoint, config) { - AWS.util.hideProperties(this, ['slashes', 'auth', 'hash', 'search', 'query']); - - if (typeof endpoint === 'undefined' || endpoint === null) { - throw new Error('Invalid endpoint: ' + endpoint); - } else if (typeof endpoint !== 'string') { - return AWS.util.copy(endpoint); - } - - if (!endpoint.match(/^http/)) { - var useSSL = config && config.sslEnabled !== undefined ? - config.sslEnabled : AWS.config.sslEnabled; - endpoint = (useSSL ? 'https' : 'http') + '://' + endpoint; - } - - AWS.util.update(this, AWS.util.urlParse(endpoint)); - - // Ensure the port property is set as an integer - if (this.port) { - this.port = parseInt(this.port, 10); - } else { - this.port = this.protocol === 'https:' ? 443 : 80; - } - } - -}); - -/** - * The low level HTTP request object, encapsulating all HTTP header - * and body data sent by a service request. - * - * @!attribute method - * @return [String] the HTTP method of the request - * @!attribute path - * @return [String] the path portion of the URI, e.g., - * "/list/?start=5&num=10" - * @!attribute headers - * @return [map] - * a map of header keys and their respective values - * @!attribute body - * @return [String] the request body payload - * @!attribute endpoint - * @return [AWS.Endpoint] the endpoint for the request - * @!attribute region - * @api private - * @return [String] the region, for signing purposes only. - */ -AWS.HttpRequest = inherit({ - - /** - * @api private - */ - constructor: function HttpRequest(endpoint, region) { - endpoint = new AWS.Endpoint(endpoint); - this.method = 'POST'; - this.path = endpoint.path || '/'; - this.headers = {}; - this.body = ''; - this.endpoint = endpoint; - this.region = region; - this._userAgent = ''; - this.setUserAgent(); - }, - - /** - * @api private - */ - setUserAgent: function setUserAgent() { - this._userAgent = this.headers[this.getUserAgentHeaderName()] = AWS.util.userAgent(); - }, - - getUserAgentHeaderName: function getUserAgentHeaderName() { - var prefix = AWS.util.isBrowser() ? 'X-Amz-' : ''; - return prefix + 'User-Agent'; - }, - - /** - * @api private - */ - appendToUserAgent: function appendToUserAgent(agentPartial) { - if (typeof agentPartial === 'string' && agentPartial) { - this._userAgent += ' ' + agentPartial; - } - this.headers[this.getUserAgentHeaderName()] = this._userAgent; - }, - - /** - * @api private - */ - getUserAgent: function getUserAgent() { - return this._userAgent; - }, - - /** - * @return [String] the part of the {path} excluding the - * query string - */ - pathname: function pathname() { - return this.path.split('?', 1)[0]; - }, - - /** - * @return [String] the query string portion of the {path} - */ - search: function search() { - var query = this.path.split('?', 2)[1]; - if (query) { - query = AWS.util.queryStringParse(query); - return AWS.util.queryParamsToString(query); - } - return ''; - }, - - /** - * @api private - * update httpRequest endpoint with endpoint string - */ - updateEndpoint: function updateEndpoint(endpointStr) { - var newEndpoint = new AWS.Endpoint(endpointStr); - this.endpoint = newEndpoint; - this.path = newEndpoint.path || '/'; - if (this.headers['Host']) { - this.headers['Host'] = newEndpoint.host; - } - } -}); - -/** - * The low level HTTP response object, encapsulating all HTTP header - * and body data returned from the request. - * - * @!attribute statusCode - * @return [Integer] the HTTP status code of the response (e.g., 200, 404) - * @!attribute headers - * @return [map] - * a map of response header keys and their respective values - * @!attribute body - * @return [String] the response body payload - * @!attribute [r] streaming - * @return [Boolean] whether this response is being streamed at a low-level. - * Defaults to `false` (buffered reads). Do not modify this manually, use - * {createUnbufferedStream} to convert the stream to unbuffered mode - * instead. - */ -AWS.HttpResponse = inherit({ - - /** - * @api private - */ - constructor: function HttpResponse() { - this.statusCode = undefined; - this.headers = {}; - this.body = undefined; - this.streaming = false; - this.stream = null; - }, - - /** - * Disables buffering on the HTTP response and returns the stream for reading. - * @return [Stream, XMLHttpRequest, null] the underlying stream object. - * Use this object to directly read data off of the stream. - * @note This object is only available after the {AWS.Request~httpHeaders} - * event has fired. This method must be called prior to - * {AWS.Request~httpData}. - * @example Taking control of a stream - * request.on('httpHeaders', function(statusCode, headers) { - * if (statusCode < 300) { - * if (headers.etag === 'xyz') { - * // pipe the stream, disabling buffering - * var stream = this.response.httpResponse.createUnbufferedStream(); - * stream.pipe(process.stdout); - * } else { // abort this request and set a better error message - * this.abort(); - * this.response.error = new Error('Invalid ETag'); - * } - * } - * }).send(console.log); - */ - createUnbufferedStream: function createUnbufferedStream() { - this.streaming = true; - return this.stream; - } -}); - - -AWS.HttpClient = inherit({}); - -/** - * @api private - */ -AWS.HttpClient.getInstance = function getInstance() { - if (this.singleton === undefined) { - this.singleton = new this(); - } - return this.singleton; -}; - - -/***/ }), - -/***/ 2310: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var Stream = AWS.util.stream.Stream; -var TransformStream = AWS.util.stream.Transform; -var ReadableStream = AWS.util.stream.Readable; -__nccwpck_require__(1556); -var CONNECTION_REUSE_ENV_NAME = 'AWS_NODEJS_CONNECTION_REUSE_ENABLED'; - -/** - * @api private - */ -AWS.NodeHttpClient = AWS.util.inherit({ - handleRequest: function handleRequest(httpRequest, httpOptions, callback, errCallback) { - var self = this; - var endpoint = httpRequest.endpoint; - var pathPrefix = ''; - if (!httpOptions) httpOptions = {}; - if (httpOptions.proxy) { - pathPrefix = endpoint.protocol + '//' + endpoint.hostname; - if (endpoint.port !== 80 && endpoint.port !== 443) { - pathPrefix += ':' + endpoint.port; - } - endpoint = new AWS.Endpoint(httpOptions.proxy); - } - - var useSSL = endpoint.protocol === 'https:'; - var http = useSSL ? __nccwpck_require__(57211) : __nccwpck_require__(98605); - var options = { - host: endpoint.hostname, - port: endpoint.port, - method: httpRequest.method, - headers: httpRequest.headers, - path: pathPrefix + httpRequest.path - }; - - if (!httpOptions.agent) { - options.agent = this.getAgent(useSSL, { - keepAlive: process.env[CONNECTION_REUSE_ENV_NAME] === '1' ? true : false - }); - } - - AWS.util.update(options, httpOptions); - delete options.proxy; // proxy isn't an HTTP option - delete options.timeout; // timeout isn't an HTTP option - - var stream = http.request(options, function (httpResp) { - if (stream.didCallback) return; - - callback(httpResp); - httpResp.emit( - 'headers', - httpResp.statusCode, - httpResp.headers, - httpResp.statusMessage - ); - }); - httpRequest.stream = stream; // attach stream to httpRequest - stream.didCallback = false; - - // connection timeout support - if (httpOptions.connectTimeout) { - var connectTimeoutId; - stream.on('socket', function(socket) { - if (socket.connecting) { - connectTimeoutId = setTimeout(function connectTimeout() { - if (stream.didCallback) return; stream.didCallback = true; - - stream.abort(); - errCallback(AWS.util.error( - new Error('Socket timed out without establishing a connection'), - {code: 'TimeoutError'} - )); - }, httpOptions.connectTimeout); - socket.on('connect', function() { - clearTimeout(connectTimeoutId); - connectTimeoutId = null; - }); - } - }); - } - - // timeout support - stream.setTimeout(httpOptions.timeout || 0, function() { - if (stream.didCallback) return; stream.didCallback = true; - - var msg = 'Connection timed out after ' + httpOptions.timeout + 'ms'; - errCallback(AWS.util.error(new Error(msg), {code: 'TimeoutError'})); - stream.abort(); - }); - - stream.on('error', function(err) { - if (connectTimeoutId) { - clearTimeout(connectTimeoutId); - connectTimeoutId = null; - } - if (stream.didCallback) return; stream.didCallback = true; - if ('ECONNRESET' === err.code || 'EPIPE' === err.code || 'ETIMEDOUT' === err.code) { - errCallback(AWS.util.error(err, {code: 'TimeoutError'})); - } else { - errCallback(err); - } - }); - - var expect = httpRequest.headers.Expect || httpRequest.headers.expect; - if (expect === '100-continue') { - stream.once('continue', function() { - self.writeBody(stream, httpRequest); - }); - } else { - this.writeBody(stream, httpRequest); - } - - return stream; - }, - - writeBody: function writeBody(stream, httpRequest) { - var body = httpRequest.body; - var totalBytes = parseInt(httpRequest.headers['Content-Length'], 10); - - if (body instanceof Stream) { - // For progress support of streaming content - - // pipe the data through a transform stream to emit 'sendProgress' events - var progressStream = this.progressStream(stream, totalBytes); - if (progressStream) { - body.pipe(progressStream).pipe(stream); - } else { - body.pipe(stream); - } - } else if (body) { - // The provided body is a buffer/string and is already fully available in memory - - // For performance it's best to send it as a whole by calling stream.end(body), - // Callers expect a 'sendProgress' event which is best emitted once - // the http request stream has been fully written and all data flushed. - // The use of totalBytes is important over body.length for strings where - // length is char length and not byte length. - stream.once('finish', function() { - stream.emit('sendProgress', { - loaded: totalBytes, - total: totalBytes - }); - }); - stream.end(body); - } else { - // no request body - stream.end(); - } - }, - - /** - * Create the https.Agent or http.Agent according to the request schema. - */ - getAgent: function getAgent(useSSL, agentOptions) { - var http = useSSL ? __nccwpck_require__(57211) : __nccwpck_require__(98605); - if (useSSL) { - if (!AWS.NodeHttpClient.sslAgent) { - AWS.NodeHttpClient.sslAgent = new http.Agent(AWS.util.merge({ - rejectUnauthorized: process.env.NODE_TLS_REJECT_UNAUTHORIZED === '0' ? false : true - }, agentOptions || {})); - AWS.NodeHttpClient.sslAgent.setMaxListeners(0); - - // delegate maxSockets to globalAgent, set a default limit of 50 if current value is Infinity. - // Users can bypass this default by supplying their own Agent as part of SDK configuration. - Object.defineProperty(AWS.NodeHttpClient.sslAgent, 'maxSockets', { - enumerable: true, - get: function() { - var defaultMaxSockets = 50; - var globalAgent = http.globalAgent; - if (globalAgent && globalAgent.maxSockets !== Infinity && typeof globalAgent.maxSockets === 'number') { - return globalAgent.maxSockets; - } - return defaultMaxSockets; - } - }); - } - return AWS.NodeHttpClient.sslAgent; - } else { - if (!AWS.NodeHttpClient.agent) { - AWS.NodeHttpClient.agent = new http.Agent(agentOptions); - } - return AWS.NodeHttpClient.agent; - } - }, - - progressStream: function progressStream(stream, totalBytes) { - if (typeof TransformStream === 'undefined') { - // for node 0.8 there is no streaming progress - return; - } - var loadedBytes = 0; - var reporter = new TransformStream(); - reporter._transform = function(chunk, encoding, callback) { - if (chunk) { - loadedBytes += chunk.length; - stream.emit('sendProgress', { - loaded: loadedBytes, - total: totalBytes - }); - } - callback(null, chunk); - }; - return reporter; - }, - - emitter: null -}); - -/** - * @!ignore - */ - -/** - * @api private - */ -AWS.HttpClient.prototype = AWS.NodeHttpClient.prototype; - -/** - * @api private - */ -AWS.HttpClient.streamsApiVersion = ReadableStream ? 2 : 1; - - -/***/ }), - -/***/ 47495: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var util = __nccwpck_require__(77985); - -function JsonBuilder() { } - -JsonBuilder.prototype.build = function(value, shape) { - return JSON.stringify(translate(value, shape)); -}; - -function translate(value, shape) { - if (!shape || value === undefined || value === null) return undefined; - - switch (shape.type) { - case 'structure': return translateStructure(value, shape); - case 'map': return translateMap(value, shape); - case 'list': return translateList(value, shape); - default: return translateScalar(value, shape); - } -} - -function translateStructure(structure, shape) { - if (shape.isDocument) { - return structure; - } - var struct = {}; - util.each(structure, function(name, value) { - var memberShape = shape.members[name]; - if (memberShape) { - if (memberShape.location !== 'body') return; - var locationName = memberShape.isLocationName ? memberShape.name : name; - var result = translate(value, memberShape); - if (result !== undefined) struct[locationName] = result; - } - }); - return struct; -} - -function translateList(list, shape) { - var out = []; - util.arrayEach(list, function(value) { - var result = translate(value, shape.member); - if (result !== undefined) out.push(result); - }); - return out; -} - -function translateMap(map, shape) { - var out = {}; - util.each(map, function(key, value) { - var result = translate(value, shape.value); - if (result !== undefined) out[key] = result; - }); - return out; -} - -function translateScalar(value, shape) { - return shape.toWireFormat(value); -} - -/** - * @api private - */ -module.exports = JsonBuilder; - - -/***/ }), - -/***/ 5474: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var util = __nccwpck_require__(77985); - -function JsonParser() { } - -JsonParser.prototype.parse = function(value, shape) { - return translate(JSON.parse(value), shape); -}; - -function translate(value, shape) { - if (!shape || value === undefined) return undefined; - - switch (shape.type) { - case 'structure': return translateStructure(value, shape); - case 'map': return translateMap(value, shape); - case 'list': return translateList(value, shape); - default: return translateScalar(value, shape); - } -} - -function translateStructure(structure, shape) { - if (structure == null) return undefined; - if (shape.isDocument) return structure; - - var struct = {}; - var shapeMembers = shape.members; - util.each(shapeMembers, function(name, memberShape) { - var locationName = memberShape.isLocationName ? memberShape.name : name; - if (Object.prototype.hasOwnProperty.call(structure, locationName)) { - var value = structure[locationName]; - var result = translate(value, memberShape); - if (result !== undefined) struct[name] = result; - } - }); - return struct; -} - -function translateList(list, shape) { - if (list == null) return undefined; - - var out = []; - util.arrayEach(list, function(value) { - var result = translate(value, shape.member); - if (result === undefined) out.push(null); - else out.push(result); - }); - return out; -} - -function translateMap(map, shape) { - if (map == null) return undefined; - - var out = {}; - util.each(map, function(key, value) { - var result = translate(value, shape.value); - if (result === undefined) out[key] = null; - else out[key] = result; - }); - return out; -} - -function translateScalar(value, shape) { - return shape.toType(value); -} - -/** - * @api private - */ -module.exports = JsonParser; - - -/***/ }), - -/***/ 25768: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -__nccwpck_require__(1556); -var inherit = AWS.util.inherit; -var getMetadataServiceEndpoint = __nccwpck_require__(608); -var URL = __nccwpck_require__(78835).URL; - -/** - * Represents a metadata service available on EC2 instances. Using the - * {request} method, you can receieve metadata about any available resource - * on the metadata service. - * - * You can disable the use of the IMDS by setting the AWS_EC2_METADATA_DISABLED - * environment variable to a truthy value. - * - * @!attribute [r] httpOptions - * @return [map] a map of options to pass to the underlying HTTP request: - * - * * **timeout** (Number) — a timeout value in milliseconds to wait - * before aborting the connection. Set to 0 for no timeout. - * - * @!macro nobrowser - */ -AWS.MetadataService = inherit({ - /** - * @return [String] the endpoint of the instance metadata service - */ - endpoint: getMetadataServiceEndpoint(), - - /** - * @!ignore - */ - - /** - * Default HTTP options. By default, the metadata service is set to not - * timeout on long requests. This means that on non-EC2 machines, this - * request will never return. If you are calling this operation from an - * environment that may not always run on EC2, set a `timeout` value so - * the SDK will abort the request after a given number of milliseconds. - */ - httpOptions: { timeout: 0 }, - - /** - * when enabled, metadata service will not fetch token - */ - disableFetchToken: false, - - /** - * Creates a new MetadataService object with a given set of options. - * - * @option options host [String] the hostname of the instance metadata - * service - * @option options httpOptions [map] a map of options to pass to the - * underlying HTTP request: - * - * * **timeout** (Number) — a timeout value in milliseconds to wait - * before aborting the connection. Set to 0 for no timeout. - * @option options maxRetries [Integer] the maximum number of retries to - * perform for timeout errors - * @option options retryDelayOptions [map] A set of options to configure the - * retry delay on retryable errors. See AWS.Config for details. - */ - constructor: function MetadataService(options) { - if (options && options.host) { - options.endpoint = 'http://' + options.host; - delete options.host; - } - AWS.util.update(this, options); - }, - - /** - * Sends a request to the instance metadata service for a given resource. - * - * @param path [String] the path of the resource to get - * - * @param options [map] an optional map used to make request - * - * * **method** (String) — HTTP request method - * - * * **headers** (map) — a map of response header keys and their respective values - * - * @callback callback function(err, data) - * Called when a response is available from the service. - * @param err [Error, null] if an error occurred, this value will be set - * @param data [String, null] if the request was successful, the body of - * the response - */ - request: function request(path, options, callback) { - if (arguments.length === 2) { - callback = options; - options = {}; - } - - if (process.env[AWS.util.imdsDisabledEnv]) { - callback(new Error('EC2 Instance Metadata Service access disabled')); - return; - } - - path = path || '/'; - - // Verify that host is a valid URL - if (URL) { new URL(this.endpoint); } - - var httpRequest = new AWS.HttpRequest(this.endpoint + path); - httpRequest.method = options.method || 'GET'; - if (options.headers) { - httpRequest.headers = options.headers; - } - AWS.util.handleRequestWithRetries(httpRequest, this, callback); - }, - - /** - * @api private - */ - loadCredentialsCallbacks: [], - - /** - * Fetches metadata token used for getting credentials - * - * @api private - * @callback callback function(err, token) - * Called when token is loaded from the resource - */ - fetchMetadataToken: function fetchMetadataToken(callback) { - var self = this; - var tokenFetchPath = '/latest/api/token'; - self.request( - tokenFetchPath, - { - 'method': 'PUT', - 'headers': { - 'x-aws-ec2-metadata-token-ttl-seconds': '21600' - } - }, - callback - ); - }, - - /** - * Fetches credentials - * - * @api private - * @callback cb function(err, creds) - * Called when credentials are loaded from the resource - */ - fetchCredentials: function fetchCredentials(options, cb) { - var self = this; - var basePath = '/latest/meta-data/iam/security-credentials/'; - - self.request(basePath, options, function (err, roleName) { - if (err) { - self.disableFetchToken = !(err.statusCode === 401); - cb(AWS.util.error( - err, - { - message: 'EC2 Metadata roleName request returned error' - } - )); - return; - } - roleName = roleName.split('\n')[0]; // grab first (and only) role - self.request(basePath + roleName, options, function (credErr, credData) { - if (credErr) { - self.disableFetchToken = !(credErr.statusCode === 401); - cb(AWS.util.error( - credErr, - { - message: 'EC2 Metadata creds request returned error' - } - )); - return; - } - try { - var credentials = JSON.parse(credData); - cb(null, credentials); - } catch (parseError) { - cb(parseError); - } - }); - }); - }, - - /** - * Loads a set of credentials stored in the instance metadata service - * - * @api private - * @callback callback function(err, credentials) - * Called when credentials are loaded from the resource - * @param err [Error] if an error occurred, this value will be set - * @param credentials [Object] the raw JSON object containing all - * metadata from the credentials resource - */ - loadCredentials: function loadCredentials(callback) { - var self = this; - self.loadCredentialsCallbacks.push(callback); - if (self.loadCredentialsCallbacks.length > 1) { return; } - - function callbacks(err, creds) { - var cb; - while ((cb = self.loadCredentialsCallbacks.shift()) !== undefined) { - cb(err, creds); - } - } - - if (self.disableFetchToken) { - self.fetchCredentials({}, callbacks); - } else { - self.fetchMetadataToken(function(tokenError, token) { - if (tokenError) { - if (tokenError.code === 'TimeoutError') { - self.disableFetchToken = true; - } else if (tokenError.retryable === true) { - callbacks(AWS.util.error( - tokenError, - { - message: 'EC2 Metadata token request returned error' - } - )); - return; - } else if (tokenError.statusCode === 400) { - callbacks(AWS.util.error( - tokenError, - { - message: 'EC2 Metadata token request returned 400' - } - )); - return; - } - } - var options = {}; - if (token) { - options.headers = { - 'x-aws-ec2-metadata-token': token - }; - } - self.fetchCredentials(options, callbacks); - }); - - } - } -}); - -/** - * @api private - */ -module.exports = AWS.MetadataService; - - -/***/ }), - -/***/ 83205: -/***/ ((module) => { - -var getEndpoint = function() { - return { - IPv4: 'http://169.254.169.254', - IPv6: 'http://[fd00:ec2::254]', - }; -}; - -module.exports = getEndpoint; - - -/***/ }), - -/***/ 95578: -/***/ ((module) => { - -var ENV_ENDPOINT_NAME = 'AWS_EC2_METADATA_SERVICE_ENDPOINT'; -var CONFIG_ENDPOINT_NAME = 'ec2_metadata_service_endpoint'; - -var getEndpointConfigOptions = function() { - return { - environmentVariableSelector: function(env) { return env[ENV_ENDPOINT_NAME]; }, - configFileSelector: function(profile) { return profile[CONFIG_ENDPOINT_NAME]; }, - default: undefined, - }; -}; - -module.exports = getEndpointConfigOptions; - - -/***/ }), - -/***/ 37997: -/***/ ((module) => { - -var getEndpointMode = function() { - return { - IPv4: 'IPv4', - IPv6: 'IPv6', - }; -}; - -module.exports = getEndpointMode; - - -/***/ }), - -/***/ 45509: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var EndpointMode = __nccwpck_require__(37997)(); - -var ENV_ENDPOINT_MODE_NAME = 'AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE'; -var CONFIG_ENDPOINT_MODE_NAME = 'ec2_metadata_service_endpoint_mode'; - -var getEndpointModeConfigOptions = function() { - return { - environmentVariableSelector: function(env) { return env[ENV_ENDPOINT_MODE_NAME]; }, - configFileSelector: function(profile) { return profile[CONFIG_ENDPOINT_MODE_NAME]; }, - default: EndpointMode.IPv4, - }; -}; - -module.exports = getEndpointModeConfigOptions; +exports.ECRPUBLIC = ECRPUBLIC; /***/ }), /***/ 608: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -var Endpoint = __nccwpck_require__(83205)(); -var EndpointMode = __nccwpck_require__(37997)(); - -var ENDPOINT_CONFIG_OPTIONS = __nccwpck_require__(95578)(); -var ENDPOINT_MODE_CONFIG_OPTIONS = __nccwpck_require__(45509)(); - -var getMetadataServiceEndpoint = function() { - var endpoint = AWS.util.loadConfig(ENDPOINT_CONFIG_OPTIONS); - if (endpoint !== undefined) return endpoint; - - var endpointMode = AWS.util.loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS); - switch (endpointMode) { - case EndpointMode.IPv4: - return Endpoint.IPv4; - case EndpointMode.IPv6: - return Endpoint.IPv6; - default: - throw new Error('Unsupported endpoint mode: ' + endpointMode); - } -}; - -module.exports = getMetadataServiceEndpoint; - - -/***/ }), - -/***/ 17657: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var Collection = __nccwpck_require__(71965); -var Operation = __nccwpck_require__(28083); -var Shape = __nccwpck_require__(71349); -var Paginator = __nccwpck_require__(45938); -var ResourceWaiter = __nccwpck_require__(41368); -var metadata = __nccwpck_require__(49497); - -var util = __nccwpck_require__(77985); -var property = util.property; -var memoizedProperty = util.memoizedProperty; - -function Api(api, options) { - var self = this; - api = api || {}; - options = options || {}; - options.api = this; - - api.metadata = api.metadata || {}; - - var serviceIdentifier = options.serviceIdentifier; - delete options.serviceIdentifier; - - property(this, 'isApi', true, false); - property(this, 'apiVersion', api.metadata.apiVersion); - property(this, 'endpointPrefix', api.metadata.endpointPrefix); - property(this, 'signingName', api.metadata.signingName); - property(this, 'globalEndpoint', api.metadata.globalEndpoint); - property(this, 'signatureVersion', api.metadata.signatureVersion); - property(this, 'jsonVersion', api.metadata.jsonVersion); - property(this, 'targetPrefix', api.metadata.targetPrefix); - property(this, 'protocol', api.metadata.protocol); - property(this, 'timestampFormat', api.metadata.timestampFormat); - property(this, 'xmlNamespaceUri', api.metadata.xmlNamespace); - property(this, 'abbreviation', api.metadata.serviceAbbreviation); - property(this, 'fullName', api.metadata.serviceFullName); - property(this, 'serviceId', api.metadata.serviceId); - if (serviceIdentifier && metadata[serviceIdentifier]) { - property(this, 'xmlNoDefaultLists', metadata[serviceIdentifier].xmlNoDefaultLists, false); - } - - memoizedProperty(this, 'className', function() { - var name = api.metadata.serviceAbbreviation || api.metadata.serviceFullName; - if (!name) return null; - - name = name.replace(/^Amazon|AWS\s*|\(.*|\s+|\W+/g, ''); - if (name === 'ElasticLoadBalancing') name = 'ELB'; - return name; - }); - - function addEndpointOperation(name, operation) { - if (operation.endpointoperation === true) { - property(self, 'endpointOperation', util.string.lowerFirst(name)); - } - if (operation.endpointdiscovery && !self.hasRequiredEndpointDiscovery) { - property( - self, - 'hasRequiredEndpointDiscovery', - operation.endpointdiscovery.required === true - ); - } - } - - property(this, 'operations', new Collection(api.operations, options, function(name, operation) { - return new Operation(name, operation, options); - }, util.string.lowerFirst, addEndpointOperation)); - - property(this, 'shapes', new Collection(api.shapes, options, function(name, shape) { - return Shape.create(shape, options); - })); - - property(this, 'paginators', new Collection(api.paginators, options, function(name, paginator) { - return new Paginator(name, paginator, options); - })); - - property(this, 'waiters', new Collection(api.waiters, options, function(name, waiter) { - return new ResourceWaiter(name, waiter, options); - }, util.string.lowerFirst)); - - if (options.documentation) { - property(this, 'documentation', api.documentation); - property(this, 'documentationUrl', api.documentationUrl); - } -} - -/** - * @api private - */ -module.exports = Api; - - -/***/ }), - -/***/ 71965: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var memoizedProperty = __nccwpck_require__(77985).memoizedProperty; - -function memoize(name, value, factory, nameTr) { - memoizedProperty(this, nameTr(name), function() { - return factory(name, value); - }); -} - -function Collection(iterable, options, factory, nameTr, callback) { - nameTr = nameTr || String; - var self = this; - - for (var id in iterable) { - if (Object.prototype.hasOwnProperty.call(iterable, id)) { - memoize.call(self, id, iterable[id], factory, nameTr); - if (callback) callback(id, iterable[id]); - } - } -} - -/** - * @api private - */ -module.exports = Collection; - - -/***/ }), - -/***/ 28083: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var Shape = __nccwpck_require__(71349); - -var util = __nccwpck_require__(77985); -var property = util.property; -var memoizedProperty = util.memoizedProperty; - -function Operation(name, operation, options) { - var self = this; - options = options || {}; - - property(this, 'name', operation.name || name); - property(this, 'api', options.api, false); - - operation.http = operation.http || {}; - property(this, 'endpoint', operation.endpoint); - property(this, 'httpMethod', operation.http.method || 'POST'); - property(this, 'httpPath', operation.http.requestUri || '/'); - property(this, 'authtype', operation.authtype || ''); - property( - this, - 'endpointDiscoveryRequired', - operation.endpointdiscovery ? - (operation.endpointdiscovery.required ? 'REQUIRED' : 'OPTIONAL') : - 'NULL' - ); - property(this, 'httpChecksumRequired', operation.httpChecksumRequired, false); - - memoizedProperty(this, 'input', function() { - if (!operation.input) { - return new Shape.create({type: 'structure'}, options); - } - return Shape.create(operation.input, options); - }); - - memoizedProperty(this, 'output', function() { - if (!operation.output) { - return new Shape.create({type: 'structure'}, options); - } - return Shape.create(operation.output, options); - }); - - memoizedProperty(this, 'errors', function() { - var list = []; - if (!operation.errors) return null; - - for (var i = 0; i < operation.errors.length; i++) { - list.push(Shape.create(operation.errors[i], options)); - } - - return list; - }); - - memoizedProperty(this, 'paginator', function() { - return options.api.paginators[name]; - }); - - if (options.documentation) { - property(this, 'documentation', operation.documentation); - property(this, 'documentationUrl', operation.documentationUrl); - } - - // idempotentMembers only tracks top-level input shapes - memoizedProperty(this, 'idempotentMembers', function() { - var idempotentMembers = []; - var input = self.input; - var members = input.members; - if (!input.members) { - return idempotentMembers; - } - for (var name in members) { - if (!members.hasOwnProperty(name)) { - continue; - } - if (members[name].isIdempotent === true) { - idempotentMembers.push(name); - } - } - return idempotentMembers; - }); - - memoizedProperty(this, 'hasEventOutput', function() { - var output = self.output; - return hasEventStream(output); - }); -} - -function hasEventStream(topLevelShape) { - var members = topLevelShape.members; - var payload = topLevelShape.payload; - - if (!topLevelShape.members) { - return false; - } - - if (payload) { - var payloadMember = members[payload]; - return payloadMember.isEventStream; - } - - // check if any member is an event stream - for (var name in members) { - if (!members.hasOwnProperty(name)) { - if (members[name].isEventStream === true) { - return true; - } - } - } - return false; -} - -/** - * @api private - */ -module.exports = Operation; - - -/***/ }), - -/***/ 45938: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var property = __nccwpck_require__(77985).property; - -function Paginator(name, paginator) { - property(this, 'inputToken', paginator.input_token); - property(this, 'limitKey', paginator.limit_key); - property(this, 'moreResults', paginator.more_results); - property(this, 'outputToken', paginator.output_token); - property(this, 'resultKey', paginator.result_key); -} - -/** - * @api private - */ -module.exports = Paginator; - - -/***/ }), - -/***/ 41368: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var util = __nccwpck_require__(77985); -var property = util.property; - -function ResourceWaiter(name, waiter, options) { - options = options || {}; - property(this, 'name', name); - property(this, 'api', options.api, false); - - if (waiter.operation) { - property(this, 'operation', util.string.lowerFirst(waiter.operation)); - } - - var self = this; - var keys = [ - 'type', - 'description', - 'delay', - 'maxAttempts', - 'acceptors' - ]; - - keys.forEach(function(key) { - var value = waiter[key]; - if (value) { - property(self, key, value); - } - }); -} - -/** - * @api private - */ -module.exports = ResourceWaiter; - - -/***/ }), - -/***/ 71349: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var Collection = __nccwpck_require__(71965); - -var util = __nccwpck_require__(77985); - -function property(obj, name, value) { - if (value !== null && value !== undefined) { - util.property.apply(this, arguments); - } -} - -function memoizedProperty(obj, name) { - if (!obj.constructor.prototype[name]) { - util.memoizedProperty.apply(this, arguments); - } -} - -function Shape(shape, options, memberName) { - options = options || {}; - - property(this, 'shape', shape.shape); - property(this, 'api', options.api, false); - property(this, 'type', shape.type); - property(this, 'enum', shape.enum); - property(this, 'min', shape.min); - property(this, 'max', shape.max); - property(this, 'pattern', shape.pattern); - property(this, 'location', shape.location || this.location || 'body'); - property(this, 'name', this.name || shape.xmlName || shape.queryName || - shape.locationName || memberName); - property(this, 'isStreaming', shape.streaming || this.isStreaming || false); - property(this, 'requiresLength', shape.requiresLength, false); - property(this, 'isComposite', shape.isComposite || false); - property(this, 'isShape', true, false); - property(this, 'isQueryName', Boolean(shape.queryName), false); - property(this, 'isLocationName', Boolean(shape.locationName), false); - property(this, 'isIdempotent', shape.idempotencyToken === true); - property(this, 'isJsonValue', shape.jsonvalue === true); - property(this, 'isSensitive', shape.sensitive === true || shape.prototype && shape.prototype.sensitive === true); - property(this, 'isEventStream', Boolean(shape.eventstream), false); - property(this, 'isEvent', Boolean(shape.event), false); - property(this, 'isEventPayload', Boolean(shape.eventpayload), false); - property(this, 'isEventHeader', Boolean(shape.eventheader), false); - property(this, 'isTimestampFormatSet', Boolean(shape.timestampFormat) || shape.prototype && shape.prototype.isTimestampFormatSet === true, false); - property(this, 'endpointDiscoveryId', Boolean(shape.endpointdiscoveryid), false); - property(this, 'hostLabel', Boolean(shape.hostLabel), false); - - if (options.documentation) { - property(this, 'documentation', shape.documentation); - property(this, 'documentationUrl', shape.documentationUrl); - } - - if (shape.xmlAttribute) { - property(this, 'isXmlAttribute', shape.xmlAttribute || false); - } - - // type conversion and parsing - property(this, 'defaultValue', null); - this.toWireFormat = function(value) { - if (value === null || value === undefined) return ''; - return value; - }; - this.toType = function(value) { return value; }; -} - -/** - * @api private - */ -Shape.normalizedTypes = { - character: 'string', - double: 'float', - long: 'integer', - short: 'integer', - biginteger: 'integer', - bigdecimal: 'float', - blob: 'binary' -}; - -/** - * @api private - */ -Shape.types = { - 'structure': StructureShape, - 'list': ListShape, - 'map': MapShape, - 'boolean': BooleanShape, - 'timestamp': TimestampShape, - 'float': FloatShape, - 'integer': IntegerShape, - 'string': StringShape, - 'base64': Base64Shape, - 'binary': BinaryShape -}; - -Shape.resolve = function resolve(shape, options) { - if (shape.shape) { - var refShape = options.api.shapes[shape.shape]; - if (!refShape) { - throw new Error('Cannot find shape reference: ' + shape.shape); - } - - return refShape; - } else { - return null; - } -}; - -Shape.create = function create(shape, options, memberName) { - if (shape.isShape) return shape; - - var refShape = Shape.resolve(shape, options); - if (refShape) { - var filteredKeys = Object.keys(shape); - if (!options.documentation) { - filteredKeys = filteredKeys.filter(function(name) { - return !name.match(/documentation/); - }); - } - - // create an inline shape with extra members - var InlineShape = function() { - refShape.constructor.call(this, shape, options, memberName); - }; - InlineShape.prototype = refShape; - return new InlineShape(); - } else { - // set type if not set - if (!shape.type) { - if (shape.members) shape.type = 'structure'; - else if (shape.member) shape.type = 'list'; - else if (shape.key) shape.type = 'map'; - else shape.type = 'string'; - } - - // normalize types - var origType = shape.type; - if (Shape.normalizedTypes[shape.type]) { - shape.type = Shape.normalizedTypes[shape.type]; - } - - if (Shape.types[shape.type]) { - return new Shape.types[shape.type](shape, options, memberName); - } else { - throw new Error('Unrecognized shape type: ' + origType); - } - } -}; - -function CompositeShape(shape) { - Shape.apply(this, arguments); - property(this, 'isComposite', true); - - if (shape.flattened) { - property(this, 'flattened', shape.flattened || false); - } -} - -function StructureShape(shape, options) { - var self = this; - var requiredMap = null, firstInit = !this.isShape; - - CompositeShape.apply(this, arguments); - - if (firstInit) { - property(this, 'defaultValue', function() { return {}; }); - property(this, 'members', {}); - property(this, 'memberNames', []); - property(this, 'required', []); - property(this, 'isRequired', function() { return false; }); - property(this, 'isDocument', Boolean(shape.document)); - } - - if (shape.members) { - property(this, 'members', new Collection(shape.members, options, function(name, member) { - return Shape.create(member, options, name); - })); - memoizedProperty(this, 'memberNames', function() { - return shape.xmlOrder || Object.keys(shape.members); - }); - - if (shape.event) { - memoizedProperty(this, 'eventPayloadMemberName', function() { - var members = self.members; - var memberNames = self.memberNames; - // iterate over members to find ones that are event payloads - for (var i = 0, iLen = memberNames.length; i < iLen; i++) { - if (members[memberNames[i]].isEventPayload) { - return memberNames[i]; - } - } - }); - - memoizedProperty(this, 'eventHeaderMemberNames', function() { - var members = self.members; - var memberNames = self.memberNames; - var eventHeaderMemberNames = []; - // iterate over members to find ones that are event headers - for (var i = 0, iLen = memberNames.length; i < iLen; i++) { - if (members[memberNames[i]].isEventHeader) { - eventHeaderMemberNames.push(memberNames[i]); - } - } - return eventHeaderMemberNames; - }); - } - } - - if (shape.required) { - property(this, 'required', shape.required); - property(this, 'isRequired', function(name) { - if (!requiredMap) { - requiredMap = {}; - for (var i = 0; i < shape.required.length; i++) { - requiredMap[shape.required[i]] = true; - } - } - - return requiredMap[name]; - }, false, true); - } - - property(this, 'resultWrapper', shape.resultWrapper || null); - - if (shape.payload) { - property(this, 'payload', shape.payload); - } - - if (typeof shape.xmlNamespace === 'string') { - property(this, 'xmlNamespaceUri', shape.xmlNamespace); - } else if (typeof shape.xmlNamespace === 'object') { - property(this, 'xmlNamespacePrefix', shape.xmlNamespace.prefix); - property(this, 'xmlNamespaceUri', shape.xmlNamespace.uri); - } -} - -function ListShape(shape, options) { - var self = this, firstInit = !this.isShape; - CompositeShape.apply(this, arguments); - - if (firstInit) { - property(this, 'defaultValue', function() { return []; }); - } - - if (shape.member) { - memoizedProperty(this, 'member', function() { - return Shape.create(shape.member, options); - }); - } - - if (this.flattened) { - var oldName = this.name; - memoizedProperty(this, 'name', function() { - return self.member.name || oldName; - }); - } -} - -function MapShape(shape, options) { - var firstInit = !this.isShape; - CompositeShape.apply(this, arguments); - - if (firstInit) { - property(this, 'defaultValue', function() { return {}; }); - property(this, 'key', Shape.create({type: 'string'}, options)); - property(this, 'value', Shape.create({type: 'string'}, options)); - } - - if (shape.key) { - memoizedProperty(this, 'key', function() { - return Shape.create(shape.key, options); - }); - } - if (shape.value) { - memoizedProperty(this, 'value', function() { - return Shape.create(shape.value, options); - }); - } -} - -function TimestampShape(shape) { - var self = this; - Shape.apply(this, arguments); - - if (shape.timestampFormat) { - property(this, 'timestampFormat', shape.timestampFormat); - } else if (self.isTimestampFormatSet && this.timestampFormat) { - property(this, 'timestampFormat', this.timestampFormat); - } else if (this.location === 'header') { - property(this, 'timestampFormat', 'rfc822'); - } else if (this.location === 'querystring') { - property(this, 'timestampFormat', 'iso8601'); - } else if (this.api) { - switch (this.api.protocol) { - case 'json': - case 'rest-json': - property(this, 'timestampFormat', 'unixTimestamp'); - break; - case 'rest-xml': - case 'query': - case 'ec2': - property(this, 'timestampFormat', 'iso8601'); - break; - } - } - - this.toType = function(value) { - if (value === null || value === undefined) return null; - if (typeof value.toUTCString === 'function') return value; - return typeof value === 'string' || typeof value === 'number' ? - util.date.parseTimestamp(value) : null; - }; - - this.toWireFormat = function(value) { - return util.date.format(value, self.timestampFormat); - }; -} - -function StringShape() { - Shape.apply(this, arguments); - - var nullLessProtocols = ['rest-xml', 'query', 'ec2']; - this.toType = function(value) { - value = this.api && nullLessProtocols.indexOf(this.api.protocol) > -1 ? - value || '' : value; - if (this.isJsonValue) { - return JSON.parse(value); - } - - return value && typeof value.toString === 'function' ? - value.toString() : value; - }; - - this.toWireFormat = function(value) { - return this.isJsonValue ? JSON.stringify(value) : value; - }; -} - -function FloatShape() { - Shape.apply(this, arguments); - - this.toType = function(value) { - if (value === null || value === undefined) return null; - return parseFloat(value); - }; - this.toWireFormat = this.toType; -} - -function IntegerShape() { - Shape.apply(this, arguments); - - this.toType = function(value) { - if (value === null || value === undefined) return null; - return parseInt(value, 10); - }; - this.toWireFormat = this.toType; -} - -function BinaryShape() { - Shape.apply(this, arguments); - this.toType = function(value) { - var buf = util.base64.decode(value); - if (this.isSensitive && util.isNode() && typeof util.Buffer.alloc === 'function') { - /* Node.js can create a Buffer that is not isolated. - * i.e. buf.byteLength !== buf.buffer.byteLength - * This means that the sensitive data is accessible to anyone with access to buf.buffer. - * If this is the node shared Buffer, then other code within this process _could_ find this secret. - * Copy sensitive data to an isolated Buffer and zero the sensitive data. - * While this is safe to do here, copying this code somewhere else may produce unexpected results. - */ - var secureBuf = util.Buffer.alloc(buf.length, buf); - buf.fill(0); - buf = secureBuf; - } - return buf; - }; - this.toWireFormat = util.base64.encode; -} - -function Base64Shape() { - BinaryShape.apply(this, arguments); -} - -function BooleanShape() { - Shape.apply(this, arguments); - - this.toType = function(value) { - if (typeof value === 'boolean') return value; - if (value === null || value === undefined) return null; - return value === 'true'; - }; -} - -/** - * @api private - */ -Shape.shapes = { - StructureShape: StructureShape, - ListShape: ListShape, - MapShape: MapShape, - StringShape: StringShape, - BooleanShape: BooleanShape, - Base64Shape: Base64Shape -}; - -/** - * @api private - */ -module.exports = Shape; - - -/***/ }), - -/***/ 73639: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var util = __nccwpck_require__(77985); - -var region_utils = __nccwpck_require__(99517); -var isFipsRegion = region_utils.isFipsRegion; -var getRealRegion = region_utils.getRealRegion; - -util.isBrowser = function() { return false; }; -util.isNode = function() { return true; }; - -// node.js specific modules -util.crypto.lib = __nccwpck_require__(76417); -util.Buffer = __nccwpck_require__(64293).Buffer; -util.domain = __nccwpck_require__(85229); -util.stream = __nccwpck_require__(92413); -util.url = __nccwpck_require__(78835); -util.querystring = __nccwpck_require__(71191); -util.environment = 'nodejs'; -util.createEventStream = util.stream.Readable ? - __nccwpck_require__(69643).createEventStream : __nccwpck_require__(63727).createEventStream; -util.realClock = __nccwpck_require__(81370); -util.clientSideMonitoring = { - Publisher: __nccwpck_require__(66807).Publisher, - configProvider: __nccwpck_require__(91822), -}; -util.iniLoader = __nccwpck_require__(29697)/* .iniLoader */ .b; -util.getSystemErrorName = __nccwpck_require__(31669).getSystemErrorName; - -util.loadConfig = function(options) { - var envValue = options.environmentVariableSelector(process.env); - if (envValue !== undefined) { - return envValue; - } - - var configFile = {}; - try { - configFile = util.iniLoader ? util.iniLoader.loadFrom({ - isConfig: true, - filename: process.env[util.sharedConfigFileEnv] - }) : {}; - } catch (e) {} - var sharedFileConfig = configFile[ - process.env.AWS_PROFILE || util.defaultProfile - ] || {}; - var configValue = options.configFileSelector(sharedFileConfig); - if (configValue !== undefined) { - return configValue; - } - - if (typeof options.default === 'function') { - return options.default(); - } - return options.default; -}; - -var AWS; - -/** - * @api private - */ -module.exports = AWS = __nccwpck_require__(28437); - -__nccwpck_require__(53819); -__nccwpck_require__(36965); -__nccwpck_require__(77360); -__nccwpck_require__(57083); -__nccwpck_require__(74998); -__nccwpck_require__(3498); -__nccwpck_require__(15037); -__nccwpck_require__(80371); - -// Load the xml2js XML parser -AWS.XML.Parser = __nccwpck_require__(96752); - -// Load Node HTTP client -__nccwpck_require__(2310); - -__nccwpck_require__(95417); - -// Load custom credential providers -__nccwpck_require__(11017); -__nccwpck_require__(73379); -__nccwpck_require__(88764); -__nccwpck_require__(10645); -__nccwpck_require__(57714); -__nccwpck_require__(27454); -__nccwpck_require__(13754); -__nccwpck_require__(80371); - -// Setup default chain providers -// If this changes, please update documentation for -// AWS.CredentialProviderChain.defaultProviders in -// credentials/credential_provider_chain.js -AWS.CredentialProviderChain.defaultProviders = [ - function () { return new AWS.EnvironmentCredentials('AWS'); }, - function () { return new AWS.EnvironmentCredentials('AMAZON'); }, - function () { return new AWS.SharedIniFileCredentials(); }, - function () { return new AWS.ECSCredentials(); }, - function () { return new AWS.ProcessCredentials(); }, - function () { return new AWS.TokenFileWebIdentityCredentials(); }, - function () { return new AWS.EC2MetadataCredentials(); } -]; - -var getRegion = function() { - var env = process.env; - var region = env.AWS_REGION || env.AMAZON_REGION; - if (env[AWS.util.configOptInEnv]) { - var toCheck = [ - {filename: env[AWS.util.sharedCredentialsFileEnv]}, - {isConfig: true, filename: env[AWS.util.sharedConfigFileEnv]} - ]; - var iniLoader = AWS.util.iniLoader; - while (!region && toCheck.length) { - var configFile = {}; - var fileInfo = toCheck.shift(); - try { - configFile = iniLoader.loadFrom(fileInfo); - } catch (err) { - if (fileInfo.isConfig) throw err; - } - var profile = configFile[env.AWS_PROFILE || AWS.util.defaultProfile]; - region = profile && profile.region; - } - } - return region; -}; - -var getBooleanValue = function(value) { - return value === 'true' ? true: value === 'false' ? false: undefined; -}; - -var USE_FIPS_ENDPOINT_CONFIG_OPTIONS = { - environmentVariableSelector: function(env) { - return getBooleanValue(env['AWS_USE_FIPS_ENDPOINT']); - }, - configFileSelector: function(profile) { - return getBooleanValue(profile['use_fips_endpoint']); - }, - default: false, -}; - -var USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = { - environmentVariableSelector: function(env) { - return getBooleanValue(env['AWS_USE_DUALSTACK_ENDPOINT']); - }, - configFileSelector: function(profile) { - return getBooleanValue(profile['use_dualstack_endpoint']); - }, - default: false, -}; - -// Update configuration keys -AWS.util.update(AWS.Config.prototype.keys, { - credentials: function () { - var credentials = null; - new AWS.CredentialProviderChain([ - function () { return new AWS.EnvironmentCredentials('AWS'); }, - function () { return new AWS.EnvironmentCredentials('AMAZON'); }, - function () { return new AWS.SharedIniFileCredentials({ disableAssumeRole: true }); } - ]).resolve(function(err, creds) { - if (!err) credentials = creds; - }); - return credentials; - }, - credentialProvider: function() { - return new AWS.CredentialProviderChain(); - }, - logger: function () { - return process.env.AWSJS_DEBUG ? console : null; - }, - region: function() { - var region = getRegion(); - return region ? getRealRegion(region): undefined; - }, - useFipsEndpoint: function() { - var region = getRegion(); - return isFipsRegion(region) - ? true - : util.loadConfig(USE_FIPS_ENDPOINT_CONFIG_OPTIONS); - }, - useDualstackEndpoint: function() { - return util.loadConfig(USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS); - } -}); - -// Reset configuration -AWS.config = new AWS.Config(); - - -/***/ }), - -/***/ 99127: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -/** - * @api private - */ -AWS.ParamValidator = AWS.util.inherit({ - /** - * Create a new validator object. - * - * @param validation [Boolean|map] whether input parameters should be - * validated against the operation description before sending the - * request. Pass a map to enable any of the following specific - * validation features: - * - * * **min** [Boolean] — Validates that a value meets the min - * constraint. This is enabled by default when paramValidation is set - * to `true`. - * * **max** [Boolean] — Validates that a value meets the max - * constraint. - * * **pattern** [Boolean] — Validates that a string value matches a - * regular expression. - * * **enum** [Boolean] — Validates that a string value matches one - * of the allowable enum values. - */ - constructor: function ParamValidator(validation) { - if (validation === true || validation === undefined) { - validation = {'min': true}; - } - this.validation = validation; - }, - - validate: function validate(shape, params, context) { - this.errors = []; - this.validateMember(shape, params || {}, context || 'params'); - - if (this.errors.length > 1) { - var msg = this.errors.join('\n* '); - msg = 'There were ' + this.errors.length + - ' validation errors:\n* ' + msg; - throw AWS.util.error(new Error(msg), - {code: 'MultipleValidationErrors', errors: this.errors}); - } else if (this.errors.length === 1) { - throw this.errors[0]; - } else { - return true; - } - }, - - fail: function fail(code, message) { - this.errors.push(AWS.util.error(new Error(message), {code: code})); - }, - - validateStructure: function validateStructure(shape, params, context) { - this.validateType(params, context, ['object'], 'structure'); - - var paramName; - for (var i = 0; shape.required && i < shape.required.length; i++) { - paramName = shape.required[i]; - var value = params[paramName]; - if (value === undefined || value === null) { - this.fail('MissingRequiredParameter', - 'Missing required key \'' + paramName + '\' in ' + context); - } - } - - // validate hash members - for (paramName in params) { - if (!Object.prototype.hasOwnProperty.call(params, paramName)) continue; - - var paramValue = params[paramName], - memberShape = shape.members[paramName]; - - if (memberShape !== undefined) { - var memberContext = [context, paramName].join('.'); - this.validateMember(memberShape, paramValue, memberContext); - } else if (paramValue !== undefined && paramValue !== null) { - this.fail('UnexpectedParameter', - 'Unexpected key \'' + paramName + '\' found in ' + context); - } - } - - return true; - }, - - validateMember: function validateMember(shape, param, context) { - switch (shape.type) { - case 'structure': - return this.validateStructure(shape, param, context); - case 'list': - return this.validateList(shape, param, context); - case 'map': - return this.validateMap(shape, param, context); - default: - return this.validateScalar(shape, param, context); - } - }, - - validateList: function validateList(shape, params, context) { - if (this.validateType(params, context, [Array])) { - this.validateRange(shape, params.length, context, 'list member count'); - // validate array members - for (var i = 0; i < params.length; i++) { - this.validateMember(shape.member, params[i], context + '[' + i + ']'); - } - } - }, - - validateMap: function validateMap(shape, params, context) { - if (this.validateType(params, context, ['object'], 'map')) { - // Build up a count of map members to validate range traits. - var mapCount = 0; - for (var param in params) { - if (!Object.prototype.hasOwnProperty.call(params, param)) continue; - // Validate any map key trait constraints - this.validateMember(shape.key, param, - context + '[key=\'' + param + '\']'); - this.validateMember(shape.value, params[param], - context + '[\'' + param + '\']'); - mapCount++; - } - this.validateRange(shape, mapCount, context, 'map member count'); - } - }, - - validateScalar: function validateScalar(shape, value, context) { - switch (shape.type) { - case null: - case undefined: - case 'string': - return this.validateString(shape, value, context); - case 'base64': - case 'binary': - return this.validatePayload(value, context); - case 'integer': - case 'float': - return this.validateNumber(shape, value, context); - case 'boolean': - return this.validateType(value, context, ['boolean']); - case 'timestamp': - return this.validateType(value, context, [Date, - /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/, 'number'], - 'Date object, ISO-8601 string, or a UNIX timestamp'); - default: - return this.fail('UnkownType', 'Unhandled type ' + - shape.type + ' for ' + context); - } - }, - - validateString: function validateString(shape, value, context) { - var validTypes = ['string']; - if (shape.isJsonValue) { - validTypes = validTypes.concat(['number', 'object', 'boolean']); - } - if (value !== null && this.validateType(value, context, validTypes)) { - this.validateEnum(shape, value, context); - this.validateRange(shape, value.length, context, 'string length'); - this.validatePattern(shape, value, context); - this.validateUri(shape, value, context); - } - }, - - validateUri: function validateUri(shape, value, context) { - if (shape['location'] === 'uri') { - if (value.length === 0) { - this.fail('UriParameterError', 'Expected uri parameter to have length >= 1,' - + ' but found "' + value +'" for ' + context); - } - } - }, - - validatePattern: function validatePattern(shape, value, context) { - if (this.validation['pattern'] && shape['pattern'] !== undefined) { - if (!(new RegExp(shape['pattern'])).test(value)) { - this.fail('PatternMatchError', 'Provided value "' + value + '" ' - + 'does not match regex pattern /' + shape['pattern'] + '/ for ' - + context); - } - } - }, - - validateRange: function validateRange(shape, value, context, descriptor) { - if (this.validation['min']) { - if (shape['min'] !== undefined && value < shape['min']) { - this.fail('MinRangeError', 'Expected ' + descriptor + ' >= ' - + shape['min'] + ', but found ' + value + ' for ' + context); - } - } - if (this.validation['max']) { - if (shape['max'] !== undefined && value > shape['max']) { - this.fail('MaxRangeError', 'Expected ' + descriptor + ' <= ' - + shape['max'] + ', but found ' + value + ' for ' + context); - } - } - }, - - validateEnum: function validateRange(shape, value, context) { - if (this.validation['enum'] && shape['enum'] !== undefined) { - // Fail if the string value is not present in the enum list - if (shape['enum'].indexOf(value) === -1) { - this.fail('EnumError', 'Found string value of ' + value + ', but ' - + 'expected ' + shape['enum'].join('|') + ' for ' + context); - } - } - }, - - validateType: function validateType(value, context, acceptedTypes, type) { - // We will not log an error for null or undefined, but we will return - // false so that callers know that the expected type was not strictly met. - if (value === null || value === undefined) return false; - - var foundInvalidType = false; - for (var i = 0; i < acceptedTypes.length; i++) { - if (typeof acceptedTypes[i] === 'string') { - if (typeof value === acceptedTypes[i]) return true; - } else if (acceptedTypes[i] instanceof RegExp) { - if ((value || '').toString().match(acceptedTypes[i])) return true; - } else { - if (value instanceof acceptedTypes[i]) return true; - if (AWS.util.isType(value, acceptedTypes[i])) return true; - if (!type && !foundInvalidType) acceptedTypes = acceptedTypes.slice(); - acceptedTypes[i] = AWS.util.typeName(acceptedTypes[i]); - } - foundInvalidType = true; - } - - var acceptedType = type; - if (!acceptedType) { - acceptedType = acceptedTypes.join(', ').replace(/,([^,]+)$/, ', or$1'); - } - - var vowel = acceptedType.match(/^[aeiou]/i) ? 'n' : ''; - this.fail('InvalidParameterType', 'Expected ' + context + ' to be a' + - vowel + ' ' + acceptedType); - return false; - }, - - validateNumber: function validateNumber(shape, value, context) { - if (value === null || value === undefined) return; - if (typeof value === 'string') { - var castedValue = parseFloat(value); - if (castedValue.toString() === value) value = castedValue; - } - if (this.validateType(value, context, ['number'])) { - this.validateRange(shape, value, context, 'numeric value'); - } - }, - - validatePayload: function validatePayload(value, context) { - if (value === null || value === undefined) return; - if (typeof value === 'string') return; - if (value && typeof value.byteLength === 'number') return; // typed arrays - if (AWS.util.isNode()) { // special check for buffer/stream in Node.js - var Stream = AWS.util.stream.Stream; - if (AWS.util.Buffer.isBuffer(value) || value instanceof Stream) return; - } else { - if (typeof Blob !== void 0 && value instanceof Blob) return; - } - - var types = ['Buffer', 'Stream', 'File', 'Blob', 'ArrayBuffer', 'DataView']; - if (value) { - for (var i = 0; i < types.length; i++) { - if (AWS.util.isType(value, types[i])) return; - if (AWS.util.typeName(value.constructor) === types[i]) return; - } - } - - this.fail('InvalidParameterType', 'Expected ' + context + ' to be a ' + - 'string, Buffer, Stream, Blob, or typed array object'); - } -}); - - -/***/ }), - -/***/ 44086: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var rest = AWS.Protocol.Rest; - -/** - * A presigner object can be used to generate presigned urls for the Polly service. - */ -AWS.Polly.Presigner = AWS.util.inherit({ - /** - * Creates a presigner object with a set of configuration options. - * - * @option options params [map] An optional map of parameters to bind to every - * request sent by this service object. - * @option options service [AWS.Polly] An optional pre-configured instance - * of the AWS.Polly service object to use for requests. The object may - * bound parameters used by the presigner. - * @see AWS.Polly.constructor - */ - constructor: function Signer(options) { - options = options || {}; - this.options = options; - this.service = options.service; - this.bindServiceObject(options); - this._operations = {}; - }, - - /** - * @api private - */ - bindServiceObject: function bindServiceObject(options) { - options = options || {}; - if (!this.service) { - this.service = new AWS.Polly(options); - } else { - var config = AWS.util.copy(this.service.config); - this.service = new this.service.constructor.__super__(config); - this.service.config.params = AWS.util.merge(this.service.config.params || {}, options.params); - } - }, - - /** - * @api private - */ - modifyInputMembers: function modifyInputMembers(input) { - // make copies of the input so we don't overwrite the api - // need to be careful to copy anything we access/modify - var modifiedInput = AWS.util.copy(input); - modifiedInput.members = AWS.util.copy(input.members); - AWS.util.each(input.members, function(name, member) { - modifiedInput.members[name] = AWS.util.copy(member); - // update location and locationName - if (!member.location || member.location === 'body') { - modifiedInput.members[name].location = 'querystring'; - modifiedInput.members[name].locationName = name; - } - }); - return modifiedInput; - }, - - /** - * @api private - */ - convertPostToGet: function convertPostToGet(req) { - // convert method - req.httpRequest.method = 'GET'; - - var operation = req.service.api.operations[req.operation]; - // get cached operation input first - var input = this._operations[req.operation]; - if (!input) { - // modify the original input - this._operations[req.operation] = input = this.modifyInputMembers(operation.input); - } - - var uri = rest.generateURI(req.httpRequest.endpoint.path, operation.httpPath, input, req.params); - - req.httpRequest.path = uri; - req.httpRequest.body = ''; - - // don't need these headers on a GET request - delete req.httpRequest.headers['Content-Length']; - delete req.httpRequest.headers['Content-Type']; - }, - - /** - * @overload getSynthesizeSpeechUrl(params = {}, [expires = 3600], [callback]) - * Generate a presigned url for {AWS.Polly.synthesizeSpeech}. - * @note You must ensure that you have static or previously resolved - * credentials if you call this method synchronously (with no callback), - * otherwise it may not properly sign the request. If you cannot guarantee - * this (you are using an asynchronous credential provider, i.e., EC2 - * IAM roles), you should always call this method with an asynchronous - * callback. - * @param params [map] parameters to pass to the operation. See the {AWS.Polly.synthesizeSpeech} - * operation for the expected operation parameters. - * @param expires [Integer] (3600) the number of seconds to expire the pre-signed URL operation in. - * Defaults to 1 hour. - * @return [string] if called synchronously (with no callback), returns the signed URL. - * @return [null] nothing is returned if a callback is provided. - * @callback callback function (err, url) - * If a callback is supplied, it is called when a signed URL has been generated. - * @param err [Error] the error object returned from the presigner. - * @param url [String] the signed URL. - * @see AWS.Polly.synthesizeSpeech - */ - getSynthesizeSpeechUrl: function getSynthesizeSpeechUrl(params, expires, callback) { - var self = this; - var request = this.service.makeRequest('synthesizeSpeech', params); - // remove existing build listeners - request.removeAllListeners('build'); - request.on('build', function(req) { - self.convertPostToGet(req); - }); - return request.presign(expires, callback); - } -}); - - -/***/ }), - -/***/ 97969: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var util = __nccwpck_require__(77985); -var AWS = __nccwpck_require__(28437); - -/** - * Prepend prefix defined by API model to endpoint that's already - * constructed. This feature does not apply to operations using - * endpoint discovery and can be disabled. - * @api private - */ -function populateHostPrefix(request) { - var enabled = request.service.config.hostPrefixEnabled; - if (!enabled) return request; - var operationModel = request.service.api.operations[request.operation]; - //don't marshal host prefix when operation has endpoint discovery traits - if (hasEndpointDiscover(request)) return request; - if (operationModel.endpoint && operationModel.endpoint.hostPrefix) { - var hostPrefixNotation = operationModel.endpoint.hostPrefix; - var hostPrefix = expandHostPrefix(hostPrefixNotation, request.params, operationModel.input); - prependEndpointPrefix(request.httpRequest.endpoint, hostPrefix); - validateHostname(request.httpRequest.endpoint.hostname); - } - return request; -} - -/** - * @api private - */ -function hasEndpointDiscover(request) { - var api = request.service.api; - var operationModel = api.operations[request.operation]; - var isEndpointOperation = api.endpointOperation && (api.endpointOperation === util.string.lowerFirst(operationModel.name)); - return (operationModel.endpointDiscoveryRequired !== 'NULL' || isEndpointOperation === true); -} - -/** - * @api private - */ -function expandHostPrefix(hostPrefixNotation, params, shape) { - util.each(shape.members, function(name, member) { - if (member.hostLabel === true) { - if (typeof params[name] !== 'string' || params[name] === '') { - throw util.error(new Error(), { - message: 'Parameter ' + name + ' should be a non-empty string.', - code: 'InvalidParameter' - }); - } - var regex = new RegExp('\\{' + name + '\\}', 'g'); - hostPrefixNotation = hostPrefixNotation.replace(regex, params[name]); - } - }); - return hostPrefixNotation; -} - -/** - * @api private - */ -function prependEndpointPrefix(endpoint, prefix) { - if (endpoint.host) { - endpoint.host = prefix + endpoint.host; - } - if (endpoint.hostname) { - endpoint.hostname = prefix + endpoint.hostname; - } -} - -/** - * @api private - */ -function validateHostname(hostname) { - var labels = hostname.split('.'); - //Reference: https://tools.ietf.org/html/rfc1123#section-2 - var hostPattern = /^[a-zA-Z0-9]{1}$|^[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]$/; - util.arrayEach(labels, function(label) { - if (!label.length || label.length < 1 || label.length > 63) { - throw util.error(new Error(), { - code: 'ValidationError', - message: 'Hostname label length should be between 1 to 63 characters, inclusive.' - }); - } - if (!hostPattern.test(label)) { - throw AWS.util.error(new Error(), - {code: 'ValidationError', message: label + ' is not hostname compatible.'}); - } - }); -} - -module.exports = { - populateHostPrefix: populateHostPrefix -}; - - -/***/ }), - -/***/ 30083: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var util = __nccwpck_require__(77985); -var JsonBuilder = __nccwpck_require__(47495); -var JsonParser = __nccwpck_require__(5474); -var populateHostPrefix = __nccwpck_require__(97969).populateHostPrefix; - -function buildRequest(req) { - var httpRequest = req.httpRequest; - var api = req.service.api; - var target = api.targetPrefix + '.' + api.operations[req.operation].name; - var version = api.jsonVersion || '1.0'; - var input = api.operations[req.operation].input; - var builder = new JsonBuilder(); - - if (version === 1) version = '1.0'; - httpRequest.body = builder.build(req.params || {}, input); - httpRequest.headers['Content-Type'] = 'application/x-amz-json-' + version; - httpRequest.headers['X-Amz-Target'] = target; - - populateHostPrefix(req); -} - -function extractError(resp) { - var error = {}; - var httpResponse = resp.httpResponse; - - error.code = httpResponse.headers['x-amzn-errortype'] || 'UnknownError'; - if (typeof error.code === 'string') { - error.code = error.code.split(':')[0]; - } - - if (httpResponse.body.length > 0) { - try { - var e = JSON.parse(httpResponse.body.toString()); - var code = e.__type || e.code || e.Code; - if (code) { - error.code = code.split('#').pop(); - } - if (error.code === 'RequestEntityTooLarge') { - error.message = 'Request body must be less than 1 MB'; - } else { - error.message = (e.message || e.Message || null); - } - } catch (e) { - error.statusCode = httpResponse.statusCode; - error.message = httpResponse.statusMessage; - } - } else { - error.statusCode = httpResponse.statusCode; - error.message = httpResponse.statusCode.toString(); - } - - resp.error = util.error(new Error(), error); -} - -function extractData(resp) { - var body = resp.httpResponse.body.toString() || '{}'; - if (resp.request.service.config.convertResponseTypes === false) { - resp.data = JSON.parse(body); - } else { - var operation = resp.request.service.api.operations[resp.request.operation]; - var shape = operation.output || {}; - var parser = new JsonParser(); - resp.data = parser.parse(body, shape); - } -} - -/** - * @api private - */ -module.exports = { - buildRequest: buildRequest, - extractError: extractError, - extractData: extractData -}; - - -/***/ }), - -/***/ 90761: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var util = __nccwpck_require__(77985); -var QueryParamSerializer = __nccwpck_require__(45175); -var Shape = __nccwpck_require__(71349); -var populateHostPrefix = __nccwpck_require__(97969).populateHostPrefix; - -function buildRequest(req) { - var operation = req.service.api.operations[req.operation]; - var httpRequest = req.httpRequest; - httpRequest.headers['Content-Type'] = - 'application/x-www-form-urlencoded; charset=utf-8'; - httpRequest.params = { - Version: req.service.api.apiVersion, - Action: operation.name - }; - - // convert the request parameters into a list of query params, - // e.g. Deeply.NestedParam.0.Name=value - var builder = new QueryParamSerializer(); - builder.serialize(req.params, operation.input, function(name, value) { - httpRequest.params[name] = value; - }); - httpRequest.body = util.queryParamsToString(httpRequest.params); - - populateHostPrefix(req); -} - -function extractError(resp) { - var data, body = resp.httpResponse.body.toString(); - if (body.match(' { - -var util = __nccwpck_require__(77985); -var populateHostPrefix = __nccwpck_require__(97969).populateHostPrefix; - -function populateMethod(req) { - req.httpRequest.method = req.service.api.operations[req.operation].httpMethod; -} - -function generateURI(endpointPath, operationPath, input, params) { - var uri = [endpointPath, operationPath].join('/'); - uri = uri.replace(/\/+/g, '/'); - - var queryString = {}, queryStringSet = false; - util.each(input.members, function (name, member) { - var paramValue = params[name]; - if (paramValue === null || paramValue === undefined) return; - if (member.location === 'uri') { - var regex = new RegExp('\\{' + member.name + '(\\+)?\\}'); - uri = uri.replace(regex, function(_, plus) { - var fn = plus ? util.uriEscapePath : util.uriEscape; - return fn(String(paramValue)); - }); - } else if (member.location === 'querystring') { - queryStringSet = true; - - if (member.type === 'list') { - queryString[member.name] = paramValue.map(function(val) { - return util.uriEscape(member.member.toWireFormat(val).toString()); - }); - } else if (member.type === 'map') { - util.each(paramValue, function(key, value) { - if (Array.isArray(value)) { - queryString[key] = value.map(function(val) { - return util.uriEscape(String(val)); - }); - } else { - queryString[key] = util.uriEscape(String(value)); - } - }); - } else { - queryString[member.name] = util.uriEscape(member.toWireFormat(paramValue).toString()); - } - } - }); - - if (queryStringSet) { - uri += (uri.indexOf('?') >= 0 ? '&' : '?'); - var parts = []; - util.arrayEach(Object.keys(queryString).sort(), function(key) { - if (!Array.isArray(queryString[key])) { - queryString[key] = [queryString[key]]; - } - for (var i = 0; i < queryString[key].length; i++) { - parts.push(util.uriEscape(String(key)) + '=' + queryString[key][i]); - } - }); - uri += parts.join('&'); - } - - return uri; -} - -function populateURI(req) { - var operation = req.service.api.operations[req.operation]; - var input = operation.input; - - var uri = generateURI(req.httpRequest.endpoint.path, operation.httpPath, input, req.params); - req.httpRequest.path = uri; -} - -function populateHeaders(req) { - var operation = req.service.api.operations[req.operation]; - util.each(operation.input.members, function (name, member) { - var value = req.params[name]; - if (value === null || value === undefined) return; - - if (member.location === 'headers' && member.type === 'map') { - util.each(value, function(key, memberValue) { - req.httpRequest.headers[member.name + key] = memberValue; - }); - } else if (member.location === 'header') { - value = member.toWireFormat(value).toString(); - if (member.isJsonValue) { - value = util.base64.encode(value); - } - req.httpRequest.headers[member.name] = value; - } - }); -} - -function buildRequest(req) { - populateMethod(req); - populateURI(req); - populateHeaders(req); - populateHostPrefix(req); -} - -function extractError() { -} - -function extractData(resp) { - var req = resp.request; - var data = {}; - var r = resp.httpResponse; - var operation = req.service.api.operations[req.operation]; - var output = operation.output; - - // normalize headers names to lower-cased keys for matching - var headers = {}; - util.each(r.headers, function (k, v) { - headers[k.toLowerCase()] = v; - }); - - util.each(output.members, function(name, member) { - var header = (member.name || name).toLowerCase(); - if (member.location === 'headers' && member.type === 'map') { - data[name] = {}; - var location = member.isLocationName ? member.name : ''; - var pattern = new RegExp('^' + location + '(.+)', 'i'); - util.each(r.headers, function (k, v) { - var result = k.match(pattern); - if (result !== null) { - data[name][result[1]] = v; - } - }); - } else if (member.location === 'header') { - if (headers[header] !== undefined) { - var value = member.isJsonValue ? - util.base64.decode(headers[header]) : - headers[header]; - data[name] = member.toType(value); - } - } else if (member.location === 'statusCode') { - data[name] = parseInt(r.statusCode, 10); - } - }); - - resp.data = data; -} - -/** - * @api private - */ -module.exports = { - buildRequest: buildRequest, - extractError: extractError, - extractData: extractData, - generateURI: generateURI -}; - - -/***/ }), - -/***/ 5883: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var util = __nccwpck_require__(77985); -var Rest = __nccwpck_require__(98200); -var Json = __nccwpck_require__(30083); -var JsonBuilder = __nccwpck_require__(47495); -var JsonParser = __nccwpck_require__(5474); - -function populateBody(req) { - var builder = new JsonBuilder(); - var input = req.service.api.operations[req.operation].input; - - if (input.payload) { - var params = {}; - var payloadShape = input.members[input.payload]; - params = req.params[input.payload]; - - if (payloadShape.type === 'structure') { - req.httpRequest.body = builder.build(params || {}, payloadShape); - applyContentTypeHeader(req); - } else if (params !== undefined) { - // non-JSON payload - req.httpRequest.body = params; - if (payloadShape.type === 'binary' || payloadShape.isStreaming) { - applyContentTypeHeader(req, true); - } - } - } else { - req.httpRequest.body = builder.build(req.params, input); - applyContentTypeHeader(req); - } -} - -function applyContentTypeHeader(req, isBinary) { - if (!req.httpRequest.headers['Content-Type']) { - var type = isBinary ? 'binary/octet-stream' : 'application/json'; - req.httpRequest.headers['Content-Type'] = type; - } -} - -function buildRequest(req) { - Rest.buildRequest(req); - - // never send body payload on GET/HEAD/DELETE - if (['GET', 'HEAD', 'DELETE'].indexOf(req.httpRequest.method) < 0) { - populateBody(req); - } -} - -function extractError(resp) { - Json.extractError(resp); -} - -function extractData(resp) { - Rest.extractData(resp); - - var req = resp.request; - var operation = req.service.api.operations[req.operation]; - var rules = req.service.api.operations[req.operation].output || {}; - var parser; - var hasEventOutput = operation.hasEventOutput; - - if (rules.payload) { - var payloadMember = rules.members[rules.payload]; - var body = resp.httpResponse.body; - if (payloadMember.isEventStream) { - parser = new JsonParser(); - resp.data[payload] = util.createEventStream( - AWS.HttpClient.streamsApiVersion === 2 ? resp.httpResponse.stream : body, - parser, - payloadMember - ); - } else if (payloadMember.type === 'structure' || payloadMember.type === 'list') { - var parser = new JsonParser(); - resp.data[rules.payload] = parser.parse(body, payloadMember); - } else if (payloadMember.type === 'binary' || payloadMember.isStreaming) { - resp.data[rules.payload] = body; - } else { - resp.data[rules.payload] = payloadMember.toType(body); - } - } else { - var data = resp.data; - Json.extractData(resp); - resp.data = util.merge(data, resp.data); - } -} - -/** - * @api private - */ -module.exports = { - buildRequest: buildRequest, - extractError: extractError, - extractData: extractData -}; - - -/***/ }), - -/***/ 15143: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var util = __nccwpck_require__(77985); -var Rest = __nccwpck_require__(98200); - -function populateBody(req) { - var input = req.service.api.operations[req.operation].input; - var builder = new AWS.XML.Builder(); - var params = req.params; - - var payload = input.payload; - if (payload) { - var payloadMember = input.members[payload]; - params = params[payload]; - if (params === undefined) return; - - if (payloadMember.type === 'structure') { - var rootElement = payloadMember.name; - req.httpRequest.body = builder.toXML(params, payloadMember, rootElement, true); - } else { // non-xml payload - req.httpRequest.body = params; - } - } else { - req.httpRequest.body = builder.toXML(params, input, input.name || - input.shape || util.string.upperFirst(req.operation) + 'Request'); - } -} - -function buildRequest(req) { - Rest.buildRequest(req); - - // never send body payload on GET/HEAD - if (['GET', 'HEAD'].indexOf(req.httpRequest.method) < 0) { - populateBody(req); - } -} - -function extractError(resp) { - Rest.extractError(resp); - - var data; - try { - data = new AWS.XML.Parser().parse(resp.httpResponse.body.toString()); - } catch (e) { - data = { - Code: resp.httpResponse.statusCode, - Message: resp.httpResponse.statusMessage - }; - } - - if (data.Errors) data = data.Errors; - if (data.Error) data = data.Error; - if (data.Code) { - resp.error = util.error(new Error(), { - code: data.Code, - message: data.Message - }); - } else { - resp.error = util.error(new Error(), { - code: resp.httpResponse.statusCode, - message: null - }); - } -} - -function extractData(resp) { - Rest.extractData(resp); - - var parser; - var req = resp.request; - var body = resp.httpResponse.body; - var operation = req.service.api.operations[req.operation]; - var output = operation.output; - - var hasEventOutput = operation.hasEventOutput; - - var payload = output.payload; - if (payload) { - var payloadMember = output.members[payload]; - if (payloadMember.isEventStream) { - parser = new AWS.XML.Parser(); - resp.data[payload] = util.createEventStream( - AWS.HttpClient.streamsApiVersion === 2 ? resp.httpResponse.stream : resp.httpResponse.body, - parser, - payloadMember - ); - } else if (payloadMember.type === 'structure') { - parser = new AWS.XML.Parser(); - resp.data[payload] = parser.parse(body.toString(), payloadMember); - } else if (payloadMember.type === 'binary' || payloadMember.isStreaming) { - resp.data[payload] = body; - } else { - resp.data[payload] = payloadMember.toType(body); - } - } else if (body.length > 0) { - parser = new AWS.XML.Parser(); - var data = parser.parse(body.toString(), output); - util.update(resp.data, data); - } -} - -/** - * @api private - */ -module.exports = { - buildRequest: buildRequest, - extractError: extractError, - extractData: extractData -}; - - -/***/ }), - -/***/ 91822: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -/** - * Resolve client-side monitoring configuration from either environmental variables - * or shared config file. Configurations from environmental variables have higher priority - * than those from shared config file. The resolver will try to read the shared config file - * no matter whether the AWS_SDK_LOAD_CONFIG variable is set. - * @api private - */ -function resolveMonitoringConfig() { - var config = { - port: undefined, - clientId: undefined, - enabled: undefined, - host: undefined - }; - if (fromEnvironment(config) || fromConfigFile(config)) return toJSType(config); - return toJSType(config); -} - -/** - * Resolve configurations from environmental variables. - * @param {object} client side monitoring config object needs to be resolved - * @returns {boolean} whether resolving configurations is done - * @api private - */ -function fromEnvironment(config) { - config.port = config.port || process.env.AWS_CSM_PORT; - config.enabled = config.enabled || process.env.AWS_CSM_ENABLED; - config.clientId = config.clientId || process.env.AWS_CSM_CLIENT_ID; - config.host = config.host || process.env.AWS_CSM_HOST; - return config.port && config.enabled && config.clientId && config.host || - ['false', '0'].indexOf(config.enabled) >= 0; //no need to read shared config file if explicitely disabled -} - -/** - * Resolve cofigurations from shared config file with specified role name - * @param {object} client side monitoring config object needs to be resolved - * @returns {boolean} whether resolving configurations is done - * @api private - */ -function fromConfigFile(config) { - var sharedFileConfig; - try { - var configFile = AWS.util.iniLoader.loadFrom({ - isConfig: true, - filename: process.env[AWS.util.sharedConfigFileEnv] - }); - var sharedFileConfig = configFile[ - process.env.AWS_PROFILE || AWS.util.defaultProfile - ]; - } catch (err) { - return false; - } - if (!sharedFileConfig) return config; - config.port = config.port || sharedFileConfig.csm_port; - config.enabled = config.enabled || sharedFileConfig.csm_enabled; - config.clientId = config.clientId || sharedFileConfig.csm_client_id; - config.host = config.host || sharedFileConfig.csm_host; - return config.port && config.enabled && config.clientId && config.host; -} - -/** - * Transfer the resolved configuration value to proper types: port as number, enabled - * as boolean and clientId as string. The 'enabled' flag is valued to false when set - * to 'false' or '0'. - * @param {object} resolved client side monitoring config - * @api private - */ -function toJSType(config) { - //config.XXX is either undefined or string - var falsyNotations = ['false', '0', undefined]; - if (!config.enabled || falsyNotations.indexOf(config.enabled.toLowerCase()) >= 0) { - config.enabled = false; - } else { - config.enabled = true; - } - config.port = config.port ? parseInt(config.port, 10) : undefined; - return config; -} - -module.exports = resolveMonitoringConfig; - - -/***/ }), - -/***/ 66807: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var util = __nccwpck_require__(28437).util; -var dgram = __nccwpck_require__(76200); -var stringToBuffer = util.buffer.toBuffer; - -var MAX_MESSAGE_SIZE = 1024 * 8; // 8 KB - -/** - * Publishes metrics via udp. - * @param {object} options Paramters for Publisher constructor - * @param {number} [options.port = 31000] Port number - * @param {string} [options.clientId = ''] Client Identifier - * @param {boolean} [options.enabled = false] enable sending metrics datagram - * @api private - */ -function Publisher(options) { - // handle configuration - options = options || {}; - this.enabled = options.enabled || false; - this.port = options.port || 31000; - this.clientId = options.clientId || ''; - this.address = options.host || '127.0.0.1'; - if (this.clientId.length > 255) { - // ClientId has a max length of 255 - this.clientId = this.clientId.substr(0, 255); - } - this.messagesInFlight = 0; -} - -Publisher.prototype.fieldsToTrim = { - UserAgent: 256, - SdkException: 128, - SdkExceptionMessage: 512, - AwsException: 128, - AwsExceptionMessage: 512, - FinalSdkException: 128, - FinalSdkExceptionMessage: 512, - FinalAwsException: 128, - FinalAwsExceptionMessage: 512 - -}; - -/** - * Trims fields that have a specified max length. - * @param {object} event ApiCall or ApiCallAttempt event. - * @returns {object} - * @api private - */ -Publisher.prototype.trimFields = function(event) { - var trimmableFields = Object.keys(this.fieldsToTrim); - for (var i = 0, iLen = trimmableFields.length; i < iLen; i++) { - var field = trimmableFields[i]; - if (event.hasOwnProperty(field)) { - var maxLength = this.fieldsToTrim[field]; - var value = event[field]; - if (value && value.length > maxLength) { - event[field] = value.substr(0, maxLength); - } - } - } - return event; -}; - -/** - * Handles ApiCall and ApiCallAttempt events. - * @param {Object} event apiCall or apiCallAttempt event. - * @api private - */ -Publisher.prototype.eventHandler = function(event) { - // set the clientId - event.ClientId = this.clientId; - - this.trimFields(event); - - var message = stringToBuffer(JSON.stringify(event)); - if (!this.enabled || message.length > MAX_MESSAGE_SIZE) { - // drop the message if publisher not enabled or it is too large - return; - } - - this.publishDatagram(message); -}; - -/** - * Publishes message to an agent. - * @param {Buffer} message JSON message to send to agent. - * @api private - */ -Publisher.prototype.publishDatagram = function(message) { - var self = this; - var client = this.getClient(); - - this.messagesInFlight++; - this.client.send(message, 0, message.length, this.port, this.address, function(err, bytes) { - if (--self.messagesInFlight <= 0) { - // destroy existing client so the event loop isn't kept open - self.destroyClient(); - } - }); -}; - -/** - * Returns an existing udp socket, or creates one if it doesn't already exist. - * @api private - */ -Publisher.prototype.getClient = function() { - if (!this.client) { - this.client = dgram.createSocket('udp4'); - } - return this.client; -}; - -/** - * Destroys the udp socket. - * @api private - */ -Publisher.prototype.destroyClient = function() { - if (this.client) { - this.client.close(); - this.client = void 0; - } -}; - -module.exports = { - Publisher: Publisher -}; - - -/***/ }), - -/***/ 45175: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var util = __nccwpck_require__(77985); - -function QueryParamSerializer() { -} - -QueryParamSerializer.prototype.serialize = function(params, shape, fn) { - serializeStructure('', params, shape, fn); -}; - -function ucfirst(shape) { - if (shape.isQueryName || shape.api.protocol !== 'ec2') { - return shape.name; - } else { - return shape.name[0].toUpperCase() + shape.name.substr(1); - } -} - -function serializeStructure(prefix, struct, rules, fn) { - util.each(rules.members, function(name, member) { - var value = struct[name]; - if (value === null || value === undefined) return; - - var memberName = ucfirst(member); - memberName = prefix ? prefix + '.' + memberName : memberName; - serializeMember(memberName, value, member, fn); - }); -} - -function serializeMap(name, map, rules, fn) { - var i = 1; - util.each(map, function (key, value) { - var prefix = rules.flattened ? '.' : '.entry.'; - var position = prefix + (i++) + '.'; - var keyName = position + (rules.key.name || 'key'); - var valueName = position + (rules.value.name || 'value'); - serializeMember(name + keyName, key, rules.key, fn); - serializeMember(name + valueName, value, rules.value, fn); - }); -} - -function serializeList(name, list, rules, fn) { - var memberRules = rules.member || {}; - - if (list.length === 0) { - fn.call(this, name, null); - return; - } - - util.arrayEach(list, function (v, n) { - var suffix = '.' + (n + 1); - if (rules.api.protocol === 'ec2') { - // Do nothing for EC2 - suffix = suffix + ''; // make linter happy - } else if (rules.flattened) { - if (memberRules.name) { - var parts = name.split('.'); - parts.pop(); - parts.push(ucfirst(memberRules)); - name = parts.join('.'); - } - } else { - suffix = '.' + (memberRules.name ? memberRules.name : 'member') + suffix; - } - serializeMember(name + suffix, v, memberRules, fn); - }); -} - -function serializeMember(name, value, rules, fn) { - if (value === null || value === undefined) return; - if (rules.type === 'structure') { - serializeStructure(name, value, rules, fn); - } else if (rules.type === 'list') { - serializeList(name, value, rules, fn); - } else if (rules.type === 'map') { - serializeMap(name, value, rules, fn); - } else { - fn(name, rules.toWireFormat(value).toString()); - } -} - -/** - * @api private - */ -module.exports = QueryParamSerializer; - - -/***/ }), - -/***/ 16612: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -/** - * @api private - */ -var service = null; - -/** - * @api private - */ -var api = { - signatureVersion: 'v4', - signingName: 'rds-db', - operations: {} -}; - -/** - * @api private - */ -var requiredAuthTokenOptions = { - region: 'string', - hostname: 'string', - port: 'number', - username: 'string' -}; - -/** - * A signer object can be used to generate an auth token to a database. - */ -AWS.RDS.Signer = AWS.util.inherit({ - /** - * Creates a signer object can be used to generate an auth token. - * - * @option options credentials [AWS.Credentials] the AWS credentials - * to sign requests with. Uses the default credential provider chain - * if not specified. - * @option options hostname [String] the hostname of the database to connect to. - * @option options port [Number] the port number the database is listening on. - * @option options region [String] the region the database is located in. - * @option options username [String] the username to login as. - * @example Passing in options to constructor - * var signer = new AWS.RDS.Signer({ - * credentials: new AWS.SharedIniFileCredentials({profile: 'default'}), - * region: 'us-east-1', - * hostname: 'db.us-east-1.rds.amazonaws.com', - * port: 8000, - * username: 'name' - * }); - */ - constructor: function Signer(options) { - this.options = options || {}; - }, - - /** - * @api private - * Strips the protocol from a url. - */ - convertUrlToAuthToken: function convertUrlToAuthToken(url) { - // we are always using https as the protocol - var protocol = 'https://'; - if (url.indexOf(protocol) === 0) { - return url.substring(protocol.length); - } - }, - - /** - * @overload getAuthToken(options = {}, [callback]) - * Generate an auth token to a database. - * @note You must ensure that you have static or previously resolved - * credentials if you call this method synchronously (with no callback), - * otherwise it may not properly sign the request. If you cannot guarantee - * this (you are using an asynchronous credential provider, i.e., EC2 - * IAM roles), you should always call this method with an asynchronous - * callback. - * - * @param options [map] The fields to use when generating an auth token. - * Any options specified here will be merged on top of any options passed - * to AWS.RDS.Signer: - * - * * **credentials** (AWS.Credentials) — the AWS credentials - * to sign requests with. Uses the default credential provider chain - * if not specified. - * * **hostname** (String) — the hostname of the database to connect to. - * * **port** (Number) — the port number the database is listening on. - * * **region** (String) — the region the database is located in. - * * **username** (String) — the username to login as. - * @return [String] if called synchronously (with no callback), returns the - * auth token. - * @return [null] nothing is returned if a callback is provided. - * @callback callback function (err, token) - * If a callback is supplied, it is called when an auth token has been generated. - * @param err [Error] the error object returned from the signer. - * @param token [String] the auth token. - * - * @example Generating an auth token synchronously - * var signer = new AWS.RDS.Signer({ - * // configure options - * region: 'us-east-1', - * username: 'default', - * hostname: 'db.us-east-1.amazonaws.com', - * port: 8000 - * }); - * var token = signer.getAuthToken({ - * // these options are merged with those defined when creating the signer, overriding in the case of a duplicate option - * // credentials are not specified here or when creating the signer, so default credential provider will be used - * username: 'test' // overriding username - * }); - * @example Generating an auth token asynchronously - * var signer = new AWS.RDS.Signer({ - * // configure options - * region: 'us-east-1', - * username: 'default', - * hostname: 'db.us-east-1.amazonaws.com', - * port: 8000 - * }); - * signer.getAuthToken({ - * // these options are merged with those defined when creating the signer, overriding in the case of a duplicate option - * // credentials are not specified here or when creating the signer, so default credential provider will be used - * username: 'test' // overriding username - * }, function(err, token) { - * if (err) { - * // handle error - * } else { - * // use token - * } - * }); - * - */ - getAuthToken: function getAuthToken(options, callback) { - if (typeof options === 'function' && callback === undefined) { - callback = options; - options = {}; - } - var self = this; - var hasCallback = typeof callback === 'function'; - // merge options with existing options - options = AWS.util.merge(this.options, options); - // validate options - var optionsValidation = this.validateAuthTokenOptions(options); - if (optionsValidation !== true) { - if (hasCallback) { - return callback(optionsValidation, null); - } - throw optionsValidation; - } - - // 15 minutes - var expires = 900; - // create service to generate a request from - var serviceOptions = { - region: options.region, - endpoint: new AWS.Endpoint(options.hostname + ':' + options.port), - paramValidation: false, - signatureVersion: 'v4' - }; - if (options.credentials) { - serviceOptions.credentials = options.credentials; - } - service = new AWS.Service(serviceOptions); - // ensure the SDK is using sigv4 signing (config is not enough) - service.api = api; - - var request = service.makeRequest(); - // add listeners to request to properly build auth token - this.modifyRequestForAuthToken(request, options); - - if (hasCallback) { - request.presign(expires, function(err, url) { - if (url) { - url = self.convertUrlToAuthToken(url); - } - callback(err, url); - }); - } else { - var url = request.presign(expires); - return this.convertUrlToAuthToken(url); - } - }, - - /** - * @api private - * Modifies a request to allow the presigner to generate an auth token. - */ - modifyRequestForAuthToken: function modifyRequestForAuthToken(request, options) { - request.on('build', request.buildAsGet); - var httpRequest = request.httpRequest; - httpRequest.body = AWS.util.queryParamsToString({ - Action: 'connect', - DBUser: options.username - }); - }, - - /** - * @api private - * Validates that the options passed in contain all the keys with values of the correct type that - * are needed to generate an auth token. - */ - validateAuthTokenOptions: function validateAuthTokenOptions(options) { - // iterate over all keys in options - var message = ''; - options = options || {}; - for (var key in requiredAuthTokenOptions) { - if (!Object.prototype.hasOwnProperty.call(requiredAuthTokenOptions, key)) { - continue; - } - if (typeof options[key] !== requiredAuthTokenOptions[key]) { - message += 'option \'' + key + '\' should have been type \'' + requiredAuthTokenOptions[key] + '\', was \'' + typeof options[key] + '\'.\n'; - } - } - if (message.length) { - return AWS.util.error(new Error(), { - code: 'InvalidParameter', - message: message - }); - } - return true; - } -}); - - -/***/ }), - -/***/ 81370: -/***/ ((module) => { - -module.exports = { - //provide realtime clock for performance measurement - now: function now() { - var second = process.hrtime(); - return second[0] * 1000 + (second[1] / 1000000); - } -}; - - -/***/ }), - -/***/ 99517: -/***/ ((module) => { - -function isFipsRegion(region) { - return typeof region === 'string' && (region.startsWith('fips-') || region.endsWith('-fips')); -} - -function isGlobalRegion(region) { - return typeof region === 'string' && ['aws-global', 'aws-us-gov-global'].includes(region); -} - -function getRealRegion(region) { - return ['fips-aws-global', 'aws-fips', 'aws-global'].includes(region) - ? 'us-east-1' - : ['fips-aws-us-gov-global', 'aws-us-gov-global'].includes(region) - ? 'us-gov-west-1' - : region.replace(/fips-(dkr-|prod-)?|-fips/, ''); -} - -module.exports = { - isFipsRegion: isFipsRegion, - isGlobalRegion: isGlobalRegion, - getRealRegion: getRealRegion -}; - - -/***/ }), - -/***/ 18262: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var util = __nccwpck_require__(77985); -var regionConfig = __nccwpck_require__(51765); - -function generateRegionPrefix(region) { - if (!region) return null; - var parts = region.split('-'); - if (parts.length < 3) return null; - return parts.slice(0, parts.length - 2).join('-') + '-*'; -} - -function derivedKeys(service) { - var region = service.config.region; - var regionPrefix = generateRegionPrefix(region); - var endpointPrefix = service.api.endpointPrefix; - - return [ - [region, endpointPrefix], - [regionPrefix, endpointPrefix], - [region, '*'], - [regionPrefix, '*'], - ['*', endpointPrefix], - ['*', '*'] - ].map(function(item) { - return item[0] && item[1] ? item.join('/') : null; - }); -} - -function applyConfig(service, config) { - util.each(config, function(key, value) { - if (key === 'globalEndpoint') return; - if (service.config[key] === undefined || service.config[key] === null) { - service.config[key] = value; - } - }); -} - -function configureEndpoint(service) { - var keys = derivedKeys(service); - var useFipsEndpoint = service.config.useFipsEndpoint; - var useDualstackEndpoint = service.config.useDualstackEndpoint; - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (!key) continue; - - var rules = useFipsEndpoint - ? useDualstackEndpoint - ? regionConfig.dualstackFipsRules - : regionConfig.fipsRules - : useDualstackEndpoint - ? regionConfig.dualstackRules - : regionConfig.rules; - - if (Object.prototype.hasOwnProperty.call(rules, key)) { - var config = rules[key]; - if (typeof config === 'string') { - config = regionConfig.patterns[config]; - } - - // set global endpoint - service.isGlobalEndpoint = !!config.globalEndpoint; - if (config.signingRegion) { - service.signingRegion = config.signingRegion; - } - - // signature version - if (!config.signatureVersion) config.signatureVersion = 'v4'; - - // merge config - applyConfig(service, config); - return; - } - } -} - -function getEndpointSuffix(region) { - var regionRegexes = { - '^(us|eu|ap|sa|ca|me)\\-\\w+\\-\\d+$': 'amazonaws.com', - '^cn\\-\\w+\\-\\d+$': 'amazonaws.com.cn', - '^us\\-gov\\-\\w+\\-\\d+$': 'amazonaws.com', - '^us\\-iso\\-\\w+\\-\\d+$': 'c2s.ic.gov', - '^us\\-isob\\-\\w+\\-\\d+$': 'sc2s.sgov.gov' - }; - var defaultSuffix = 'amazonaws.com'; - var regexes = Object.keys(regionRegexes); - for (var i = 0; i < regexes.length; i++) { - var regionPattern = RegExp(regexes[i]); - var dnsSuffix = regionRegexes[regexes[i]]; - if (regionPattern.test(region)) return dnsSuffix; - } - return defaultSuffix; -} - -/** - * @api private - */ -module.exports = { - configureEndpoint: configureEndpoint, - getEndpointSuffix: getEndpointSuffix, -}; - - -/***/ }), - -/***/ 78652: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var AcceptorStateMachine = __nccwpck_require__(68118); -var inherit = AWS.util.inherit; -var domain = AWS.util.domain; -var jmespath = __nccwpck_require__(87783); - -/** - * @api private - */ -var hardErrorStates = {success: 1, error: 1, complete: 1}; - -function isTerminalState(machine) { - return Object.prototype.hasOwnProperty.call(hardErrorStates, machine._asm.currentState); -} - -var fsm = new AcceptorStateMachine(); -fsm.setupStates = function() { - var transition = function(_, done) { - var self = this; - self._haltHandlersOnError = false; - - self.emit(self._asm.currentState, function(err) { - if (err) { - if (isTerminalState(self)) { - if (domain && self.domain instanceof domain.Domain) { - err.domainEmitter = self; - err.domain = self.domain; - err.domainThrown = false; - self.domain.emit('error', err); - } else { - throw err; - } - } else { - self.response.error = err; - done(err); - } - } else { - done(self.response.error); - } - }); - - }; - - this.addState('validate', 'build', 'error', transition); - this.addState('build', 'afterBuild', 'restart', transition); - this.addState('afterBuild', 'sign', 'restart', transition); - this.addState('sign', 'send', 'retry', transition); - this.addState('retry', 'afterRetry', 'afterRetry', transition); - this.addState('afterRetry', 'sign', 'error', transition); - this.addState('send', 'validateResponse', 'retry', transition); - this.addState('validateResponse', 'extractData', 'extractError', transition); - this.addState('extractError', 'extractData', 'retry', transition); - this.addState('extractData', 'success', 'retry', transition); - this.addState('restart', 'build', 'error', transition); - this.addState('success', 'complete', 'complete', transition); - this.addState('error', 'complete', 'complete', transition); - this.addState('complete', null, null, transition); -}; -fsm.setupStates(); - -/** - * ## Asynchronous Requests - * - * All requests made through the SDK are asynchronous and use a - * callback interface. Each service method that kicks off a request - * returns an `AWS.Request` object that you can use to register - * callbacks. - * - * For example, the following service method returns the request - * object as "request", which can be used to register callbacks: - * - * ```javascript - * // request is an AWS.Request object - * var request = ec2.describeInstances(); - * - * // register callbacks on request to retrieve response data - * request.on('success', function(response) { - * console.log(response.data); - * }); - * ``` - * - * When a request is ready to be sent, the {send} method should - * be called: - * - * ```javascript - * request.send(); - * ``` - * - * Since registered callbacks may or may not be idempotent, requests should only - * be sent once. To perform the same operation multiple times, you will need to - * create multiple request objects, each with its own registered callbacks. - * - * ## Removing Default Listeners for Events - * - * Request objects are built with default listeners for the various events, - * depending on the service type. In some cases, you may want to remove - * some built-in listeners to customize behaviour. Doing this requires - * access to the built-in listener functions, which are exposed through - * the {AWS.EventListeners.Core} namespace. For instance, you may - * want to customize the HTTP handler used when sending a request. In this - * case, you can remove the built-in listener associated with the 'send' - * event, the {AWS.EventListeners.Core.SEND} listener and add your own. - * - * ## Multiple Callbacks and Chaining - * - * You can register multiple callbacks on any request object. The - * callbacks can be registered for different events, or all for the - * same event. In addition, you can chain callback registration, for - * example: - * - * ```javascript - * request. - * on('success', function(response) { - * console.log("Success!"); - * }). - * on('error', function(error, response) { - * console.log("Error!"); - * }). - * on('complete', function(response) { - * console.log("Always!"); - * }). - * send(); - * ``` - * - * The above example will print either "Success! Always!", or "Error! Always!", - * depending on whether the request succeeded or not. - * - * @!attribute httpRequest - * @readonly - * @!group HTTP Properties - * @return [AWS.HttpRequest] the raw HTTP request object - * containing request headers and body information - * sent by the service. - * - * @!attribute startTime - * @readonly - * @!group Operation Properties - * @return [Date] the time that the request started - * - * @!group Request Building Events - * - * @!event validate(request) - * Triggered when a request is being validated. Listeners - * should throw an error if the request should not be sent. - * @param request [Request] the request object being sent - * @see AWS.EventListeners.Core.VALIDATE_CREDENTIALS - * @see AWS.EventListeners.Core.VALIDATE_REGION - * @example Ensuring that a certain parameter is set before sending a request - * var req = s3.putObject(params); - * req.on('validate', function() { - * if (!req.params.Body.match(/^Hello\s/)) { - * throw new Error('Body must start with "Hello "'); - * } - * }); - * req.send(function(err, data) { ... }); - * - * @!event build(request) - * Triggered when the request payload is being built. Listeners - * should fill the necessary information to send the request - * over HTTP. - * @param (see AWS.Request~validate) - * @example Add a custom HTTP header to a request - * var req = s3.putObject(params); - * req.on('build', function() { - * req.httpRequest.headers['Custom-Header'] = 'value'; - * }); - * req.send(function(err, data) { ... }); - * - * @!event sign(request) - * Triggered when the request is being signed. Listeners should - * add the correct authentication headers and/or adjust the body, - * depending on the authentication mechanism being used. - * @param (see AWS.Request~validate) - * - * @!group Request Sending Events - * - * @!event send(response) - * Triggered when the request is ready to be sent. Listeners - * should call the underlying transport layer to initiate - * the sending of the request. - * @param response [Response] the response object - * @context [Request] the request object that was sent - * @see AWS.EventListeners.Core.SEND - * - * @!event retry(response) - * Triggered when a request failed and might need to be retried or redirected. - * If the response is retryable, the listener should set the - * `response.error.retryable` property to `true`, and optionally set - * `response.error.retryDelay` to the millisecond delay for the next attempt. - * In the case of a redirect, `response.error.redirect` should be set to - * `true` with `retryDelay` set to an optional delay on the next request. - * - * If a listener decides that a request should not be retried, - * it should set both `retryable` and `redirect` to false. - * - * Note that a retryable error will be retried at most - * {AWS.Config.maxRetries} times (based on the service object's config). - * Similarly, a request that is redirected will only redirect at most - * {AWS.Config.maxRedirects} times. - * - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * @example Adding a custom retry for a 404 response - * request.on('retry', function(response) { - * // this resource is not yet available, wait 10 seconds to get it again - * if (response.httpResponse.statusCode === 404 && response.error) { - * response.error.retryable = true; // retry this error - * response.error.retryDelay = 10000; // wait 10 seconds - * } - * }); - * - * @!group Data Parsing Events - * - * @!event extractError(response) - * Triggered on all non-2xx requests so that listeners can extract - * error details from the response body. Listeners to this event - * should set the `response.error` property. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!event extractData(response) - * Triggered in successful requests to allow listeners to - * de-serialize the response body into `response.data`. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!group Completion Events - * - * @!event success(response) - * Triggered when the request completed successfully. - * `response.data` will contain the response data and - * `response.error` will be null. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!event error(error, response) - * Triggered when an error occurs at any point during the - * request. `response.error` will contain details about the error - * that occurred. `response.data` will be null. - * @param error [Error] the error object containing details about - * the error that occurred. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!event complete(response) - * Triggered whenever a request cycle completes. `response.error` - * should be checked, since the request may have failed. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!group HTTP Events - * - * @!event httpHeaders(statusCode, headers, response, statusMessage) - * Triggered when headers are sent by the remote server - * @param statusCode [Integer] the HTTP response code - * @param headers [map] the response headers - * @param (see AWS.Request~send) - * @param statusMessage [String] A status message corresponding to the HTTP - * response code - * @context (see AWS.Request~send) - * - * @!event httpData(chunk, response) - * Triggered when data is sent by the remote server - * @param chunk [Buffer] the buffer data containing the next data chunk - * from the server - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * @see AWS.EventListeners.Core.HTTP_DATA - * - * @!event httpUploadProgress(progress, response) - * Triggered when the HTTP request has uploaded more data - * @param progress [map] An object containing the `loaded` and `total` bytes - * of the request. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * @note This event will not be emitted in Node.js 0.8.x. - * - * @!event httpDownloadProgress(progress, response) - * Triggered when the HTTP request has downloaded more data - * @param progress [map] An object containing the `loaded` and `total` bytes - * of the request. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * @note This event will not be emitted in Node.js 0.8.x. - * - * @!event httpError(error, response) - * Triggered when the HTTP request failed - * @param error [Error] the error object that was thrown - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!event httpDone(response) - * Triggered when the server is finished sending data - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @see AWS.Response - */ -AWS.Request = inherit({ - - /** - * Creates a request for an operation on a given service with - * a set of input parameters. - * - * @param service [AWS.Service] the service to perform the operation on - * @param operation [String] the operation to perform on the service - * @param params [Object] parameters to send to the operation. - * See the operation's documentation for the format of the - * parameters. - */ - constructor: function Request(service, operation, params) { - var endpoint = service.endpoint; - var region = service.config.region; - var customUserAgent = service.config.customUserAgent; - - if (service.signingRegion) { - region = service.signingRegion; - } else if (service.isGlobalEndpoint) { - region = 'us-east-1'; - } - - this.domain = domain && domain.active; - this.service = service; - this.operation = operation; - this.params = params || {}; - this.httpRequest = new AWS.HttpRequest(endpoint, region); - this.httpRequest.appendToUserAgent(customUserAgent); - this.startTime = service.getSkewCorrectedDate(); - - this.response = new AWS.Response(this); - this._asm = new AcceptorStateMachine(fsm.states, 'validate'); - this._haltHandlersOnError = false; - - AWS.SequentialExecutor.call(this); - this.emit = this.emitEvent; - }, - - /** - * @!group Sending a Request - */ - - /** - * @overload send(callback = null) - * Sends the request object. - * - * @callback callback function(err, data) - * If a callback is supplied, it is called when a response is returned - * from the service. - * @context [AWS.Request] the request object being sent. - * @param err [Error] the error object returned from the request. - * Set to `null` if the request is successful. - * @param data [Object] the de-serialized data returned from - * the request. Set to `null` if a request error occurs. - * @example Sending a request with a callback - * request = s3.putObject({Bucket: 'bucket', Key: 'key'}); - * request.send(function(err, data) { console.log(err, data); }); - * @example Sending a request with no callback (using event handlers) - * request = s3.putObject({Bucket: 'bucket', Key: 'key'}); - * request.on('complete', function(response) { ... }); // register a callback - * request.send(); - */ - send: function send(callback) { - if (callback) { - // append to user agent - this.httpRequest.appendToUserAgent('callback'); - this.on('complete', function (resp) { - callback.call(resp, resp.error, resp.data); - }); - } - this.runTo(); - - return this.response; - }, - - /** - * @!method promise() - * Sends the request and returns a 'thenable' promise. - * - * Two callbacks can be provided to the `then` method on the returned promise. - * The first callback will be called if the promise is fulfilled, and the second - * callback will be called if the promise is rejected. - * @callback fulfilledCallback function(data) - * Called if the promise is fulfilled. - * @param data [Object] the de-serialized data returned from the request. - * @callback rejectedCallback function(error) - * Called if the promise is rejected. - * @param error [Error] the error object returned from the request. - * @return [Promise] A promise that represents the state of the request. - * @example Sending a request using promises. - * var request = s3.putObject({Bucket: 'bucket', Key: 'key'}); - * var result = request.promise(); - * result.then(function(data) { ... }, function(error) { ... }); - */ - - /** - * @api private - */ - build: function build(callback) { - return this.runTo('send', callback); - }, - - /** - * @api private - */ - runTo: function runTo(state, done) { - this._asm.runTo(state, done, this); - return this; - }, - - /** - * Aborts a request, emitting the error and complete events. - * - * @!macro nobrowser - * @example Aborting a request after sending - * var params = { - * Bucket: 'bucket', Key: 'key', - * Body: Buffer.alloc(1024 * 1024 * 5) // 5MB payload - * }; - * var request = s3.putObject(params); - * request.send(function (err, data) { - * if (err) console.log("Error:", err.code, err.message); - * else console.log(data); - * }); - * - * // abort request in 1 second - * setTimeout(request.abort.bind(request), 1000); - * - * // prints "Error: RequestAbortedError Request aborted by user" - * @return [AWS.Request] the same request object, for chaining. - * @since v1.4.0 - */ - abort: function abort() { - this.removeAllListeners('validateResponse'); - this.removeAllListeners('extractError'); - this.on('validateResponse', function addAbortedError(resp) { - resp.error = AWS.util.error(new Error('Request aborted by user'), { - code: 'RequestAbortedError', retryable: false - }); - }); - - if (this.httpRequest.stream && !this.httpRequest.stream.didCallback) { // abort HTTP stream - this.httpRequest.stream.abort(); - if (this.httpRequest._abortCallback) { - this.httpRequest._abortCallback(); - } else { - this.removeAllListeners('send'); // haven't sent yet, so let's not - } - } - - return this; - }, - - /** - * Iterates over each page of results given a pageable request, calling - * the provided callback with each page of data. After all pages have been - * retrieved, the callback is called with `null` data. - * - * @note This operation can generate multiple requests to a service. - * @example Iterating over multiple pages of objects in an S3 bucket - * var pages = 1; - * s3.listObjects().eachPage(function(err, data) { - * if (err) return; - * console.log("Page", pages++); - * console.log(data); - * }); - * @example Iterating over multiple pages with an asynchronous callback - * s3.listObjects(params).eachPage(function(err, data, done) { - * doSomethingAsyncAndOrExpensive(function() { - * // The next page of results isn't fetched until done is called - * done(); - * }); - * }); - * @callback callback function(err, data, [doneCallback]) - * Called with each page of resulting data from the request. If the - * optional `doneCallback` is provided in the function, it must be called - * when the callback is complete. - * - * @param err [Error] an error object, if an error occurred. - * @param data [Object] a single page of response data. If there is no - * more data, this object will be `null`. - * @param doneCallback [Function] an optional done callback. If this - * argument is defined in the function declaration, it should be called - * when the next page is ready to be retrieved. This is useful for - * controlling serial pagination across asynchronous operations. - * @return [Boolean] if the callback returns `false`, pagination will - * stop. - * - * @see AWS.Request.eachItem - * @see AWS.Response.nextPage - * @since v1.4.0 - */ - eachPage: function eachPage(callback) { - // Make all callbacks async-ish - callback = AWS.util.fn.makeAsync(callback, 3); - - function wrappedCallback(response) { - callback.call(response, response.error, response.data, function (result) { - if (result === false) return; - - if (response.hasNextPage()) { - response.nextPage().on('complete', wrappedCallback).send(); - } else { - callback.call(response, null, null, AWS.util.fn.noop); - } - }); - } - - this.on('complete', wrappedCallback).send(); - }, - - /** - * Enumerates over individual items of a request, paging the responses if - * necessary. - * - * @api experimental - * @since v1.4.0 - */ - eachItem: function eachItem(callback) { - var self = this; - function wrappedCallback(err, data) { - if (err) return callback(err, null); - if (data === null) return callback(null, null); - - var config = self.service.paginationConfig(self.operation); - var resultKey = config.resultKey; - if (Array.isArray(resultKey)) resultKey = resultKey[0]; - var items = jmespath.search(data, resultKey); - var continueIteration = true; - AWS.util.arrayEach(items, function(item) { - continueIteration = callback(null, item); - if (continueIteration === false) { - return AWS.util.abort; - } - }); - return continueIteration; - } - - this.eachPage(wrappedCallback); - }, - - /** - * @return [Boolean] whether the operation can return multiple pages of - * response data. - * @see AWS.Response.eachPage - * @since v1.4.0 - */ - isPageable: function isPageable() { - return this.service.paginationConfig(this.operation) ? true : false; - }, - - /** - * Sends the request and converts the request object into a readable stream - * that can be read from or piped into a writable stream. - * - * @note The data read from a readable stream contains only - * the raw HTTP body contents. - * @example Manually reading from a stream - * request.createReadStream().on('data', function(data) { - * console.log("Got data:", data.toString()); - * }); - * @example Piping a request body into a file - * var out = fs.createWriteStream('/path/to/outfile.jpg'); - * s3.service.getObject(params).createReadStream().pipe(out); - * @return [Stream] the readable stream object that can be piped - * or read from (by registering 'data' event listeners). - * @!macro nobrowser - */ - createReadStream: function createReadStream() { - var streams = AWS.util.stream; - var req = this; - var stream = null; - - if (AWS.HttpClient.streamsApiVersion === 2) { - stream = new streams.PassThrough(); - process.nextTick(function() { req.send(); }); - } else { - stream = new streams.Stream(); - stream.readable = true; - - stream.sent = false; - stream.on('newListener', function(event) { - if (!stream.sent && event === 'data') { - stream.sent = true; - process.nextTick(function() { req.send(); }); - } - }); - } - - this.on('error', function(err) { - stream.emit('error', err); - }); - - this.on('httpHeaders', function streamHeaders(statusCode, headers, resp) { - if (statusCode < 300) { - req.removeListener('httpData', AWS.EventListeners.Core.HTTP_DATA); - req.removeListener('httpError', AWS.EventListeners.Core.HTTP_ERROR); - req.on('httpError', function streamHttpError(error) { - resp.error = error; - resp.error.retryable = false; - }); - - var shouldCheckContentLength = false; - var expectedLen; - if (req.httpRequest.method !== 'HEAD') { - expectedLen = parseInt(headers['content-length'], 10); - } - if (expectedLen !== undefined && !isNaN(expectedLen) && expectedLen >= 0) { - shouldCheckContentLength = true; - var receivedLen = 0; - } - - var checkContentLengthAndEmit = function checkContentLengthAndEmit() { - if (shouldCheckContentLength && receivedLen !== expectedLen) { - stream.emit('error', AWS.util.error( - new Error('Stream content length mismatch. Received ' + - receivedLen + ' of ' + expectedLen + ' bytes.'), - { code: 'StreamContentLengthMismatch' } - )); - } else if (AWS.HttpClient.streamsApiVersion === 2) { - stream.end(); - } else { - stream.emit('end'); - } - }; - - var httpStream = resp.httpResponse.createUnbufferedStream(); - - if (AWS.HttpClient.streamsApiVersion === 2) { - if (shouldCheckContentLength) { - var lengthAccumulator = new streams.PassThrough(); - lengthAccumulator._write = function(chunk) { - if (chunk && chunk.length) { - receivedLen += chunk.length; - } - return streams.PassThrough.prototype._write.apply(this, arguments); - }; - - lengthAccumulator.on('end', checkContentLengthAndEmit); - stream.on('error', function(err) { - shouldCheckContentLength = false; - httpStream.unpipe(lengthAccumulator); - lengthAccumulator.emit('end'); - lengthAccumulator.end(); - }); - httpStream.pipe(lengthAccumulator).pipe(stream, { end: false }); - } else { - httpStream.pipe(stream); - } - } else { - - if (shouldCheckContentLength) { - httpStream.on('data', function(arg) { - if (arg && arg.length) { - receivedLen += arg.length; - } - }); - } - - httpStream.on('data', function(arg) { - stream.emit('data', arg); - }); - httpStream.on('end', checkContentLengthAndEmit); - } - - httpStream.on('error', function(err) { - shouldCheckContentLength = false; - stream.emit('error', err); - }); - } - }); - - return stream; - }, - - /** - * @param [Array,Response] args This should be the response object, - * or an array of args to send to the event. - * @api private - */ - emitEvent: function emit(eventName, args, done) { - if (typeof args === 'function') { done = args; args = null; } - if (!done) done = function() { }; - if (!args) args = this.eventParameters(eventName, this.response); - - var origEmit = AWS.SequentialExecutor.prototype.emit; - origEmit.call(this, eventName, args, function (err) { - if (err) this.response.error = err; - done.call(this, err); - }); - }, - - /** - * @api private - */ - eventParameters: function eventParameters(eventName) { - switch (eventName) { - case 'restart': - case 'validate': - case 'sign': - case 'build': - case 'afterValidate': - case 'afterBuild': - return [this]; - case 'error': - return [this.response.error, this.response]; - default: - return [this.response]; - } - }, - - /** - * @api private - */ - presign: function presign(expires, callback) { - if (!callback && typeof expires === 'function') { - callback = expires; - expires = null; - } - return new AWS.Signers.Presign().sign(this.toGet(), expires, callback); - }, - - /** - * @api private - */ - isPresigned: function isPresigned() { - return Object.prototype.hasOwnProperty.call(this.httpRequest.headers, 'presigned-expires'); - }, - - /** - * @api private - */ - toUnauthenticated: function toUnauthenticated() { - this._unAuthenticated = true; - this.removeListener('validate', AWS.EventListeners.Core.VALIDATE_CREDENTIALS); - this.removeListener('sign', AWS.EventListeners.Core.SIGN); - return this; - }, - - /** - * @api private - */ - toGet: function toGet() { - if (this.service.api.protocol === 'query' || - this.service.api.protocol === 'ec2') { - this.removeListener('build', this.buildAsGet); - this.addListener('build', this.buildAsGet); - } - return this; - }, - - /** - * @api private - */ - buildAsGet: function buildAsGet(request) { - request.httpRequest.method = 'GET'; - request.httpRequest.path = request.service.endpoint.path + - '?' + request.httpRequest.body; - request.httpRequest.body = ''; - - // don't need these headers on a GET request - delete request.httpRequest.headers['Content-Length']; - delete request.httpRequest.headers['Content-Type']; - }, - - /** - * @api private - */ - haltHandlersOnError: function haltHandlersOnError() { - this._haltHandlersOnError = true; - } -}); - -/** - * @api private - */ -AWS.Request.addPromisesToClass = function addPromisesToClass(PromiseDependency) { - this.prototype.promise = function promise() { - var self = this; - // append to user agent - this.httpRequest.appendToUserAgent('promise'); - return new PromiseDependency(function(resolve, reject) { - self.on('complete', function(resp) { - if (resp.error) { - reject(resp.error); - } else { - // define $response property so that it is not enumerable - // this prevents circular reference errors when stringifying the JSON object - resolve(Object.defineProperty( - resp.data || {}, - '$response', - {value: resp} - )); - } - }); - self.runTo(); - }); - }; -}; - -/** - * @api private - */ -AWS.Request.deletePromisesFromClass = function deletePromisesFromClass() { - delete this.prototype.promise; -}; - -AWS.util.addPromises(AWS.Request); - -AWS.util.mixin(AWS.Request, AWS.SequentialExecutor); - - -/***/ }), - -/***/ 7246: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -/** - * Copyright 2012-2013 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. A copy of - * the License is located at - * - * http://aws.amazon.com/apache2.0/ - * - * or in the "license" file accompanying this file. This file 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. - */ - -var AWS = __nccwpck_require__(28437); -var inherit = AWS.util.inherit; -var jmespath = __nccwpck_require__(87783); - -/** - * @api private - */ -function CHECK_ACCEPTORS(resp) { - var waiter = resp.request._waiter; - var acceptors = waiter.config.acceptors; - var acceptorMatched = false; - var state = 'retry'; - - acceptors.forEach(function(acceptor) { - if (!acceptorMatched) { - var matcher = waiter.matchers[acceptor.matcher]; - if (matcher && matcher(resp, acceptor.expected, acceptor.argument)) { - acceptorMatched = true; - state = acceptor.state; - } - } - }); - - if (!acceptorMatched && resp.error) state = 'failure'; - - if (state === 'success') { - waiter.setSuccess(resp); - } else { - waiter.setError(resp, state === 'retry'); - } -} - -/** - * @api private - */ -AWS.ResourceWaiter = inherit({ - /** - * Waits for a given state on a service object - * @param service [Service] the service object to wait on - * @param state [String] the state (defined in waiter configuration) to wait - * for. - * @example Create a waiter for running EC2 instances - * var ec2 = new AWS.EC2; - * var waiter = new AWS.ResourceWaiter(ec2, 'instanceRunning'); - */ - constructor: function constructor(service, state) { - this.service = service; - this.state = state; - this.loadWaiterConfig(this.state); - }, - - service: null, - - state: null, - - config: null, - - matchers: { - path: function(resp, expected, argument) { - try { - var result = jmespath.search(resp.data, argument); - } catch (err) { - return false; - } - - return jmespath.strictDeepEqual(result,expected); - }, - - pathAll: function(resp, expected, argument) { - try { - var results = jmespath.search(resp.data, argument); - } catch (err) { - return false; - } - - if (!Array.isArray(results)) results = [results]; - var numResults = results.length; - if (!numResults) return false; - for (var ind = 0 ; ind < numResults; ind++) { - if (!jmespath.strictDeepEqual(results[ind], expected)) { - return false; - } - } - return true; - }, - - pathAny: function(resp, expected, argument) { - try { - var results = jmespath.search(resp.data, argument); - } catch (err) { - return false; - } - - if (!Array.isArray(results)) results = [results]; - var numResults = results.length; - for (var ind = 0 ; ind < numResults; ind++) { - if (jmespath.strictDeepEqual(results[ind], expected)) { - return true; - } - } - return false; - }, - - status: function(resp, expected) { - var statusCode = resp.httpResponse.statusCode; - return (typeof statusCode === 'number') && (statusCode === expected); - }, - - error: function(resp, expected) { - if (typeof expected === 'string' && resp.error) { - return expected === resp.error.code; - } - // if expected is not string, can be boolean indicating presence of error - return expected === !!resp.error; - } - }, - - listeners: new AWS.SequentialExecutor().addNamedListeners(function(add) { - add('RETRY_CHECK', 'retry', function(resp) { - var waiter = resp.request._waiter; - if (resp.error && resp.error.code === 'ResourceNotReady') { - resp.error.retryDelay = (waiter.config.delay || 0) * 1000; - } - }); - - add('CHECK_OUTPUT', 'extractData', CHECK_ACCEPTORS); - - add('CHECK_ERROR', 'extractError', CHECK_ACCEPTORS); - }), - - /** - * @return [AWS.Request] - */ - wait: function wait(params, callback) { - if (typeof params === 'function') { - callback = params; params = undefined; - } - - if (params && params.$waiter) { - params = AWS.util.copy(params); - if (typeof params.$waiter.delay === 'number') { - this.config.delay = params.$waiter.delay; - } - if (typeof params.$waiter.maxAttempts === 'number') { - this.config.maxAttempts = params.$waiter.maxAttempts; - } - delete params.$waiter; - } - - var request = this.service.makeRequest(this.config.operation, params); - request._waiter = this; - request.response.maxRetries = this.config.maxAttempts; - request.addListeners(this.listeners); - - if (callback) request.send(callback); - return request; - }, - - setSuccess: function setSuccess(resp) { - resp.error = null; - resp.data = resp.data || {}; - resp.request.removeAllListeners('extractData'); - }, - - setError: function setError(resp, retryable) { - resp.data = null; - resp.error = AWS.util.error(resp.error || new Error(), { - code: 'ResourceNotReady', - message: 'Resource is not in the state ' + this.state, - retryable: retryable - }); - }, - - /** - * Loads waiter configuration from API configuration - * - * @api private - */ - loadWaiterConfig: function loadWaiterConfig(state) { - if (!this.service.api.waiters[state]) { - throw new AWS.util.error(new Error(), { - code: 'StateNotFoundError', - message: 'State ' + state + ' not found.' - }); - } - - this.config = AWS.util.copy(this.service.api.waiters[state]); - } -}); - - -/***/ }), - -/***/ 58743: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var inherit = AWS.util.inherit; -var jmespath = __nccwpck_require__(87783); - -/** - * This class encapsulates the response information - * from a service request operation sent through {AWS.Request}. - * The response object has two main properties for getting information - * back from a request: - * - * ## The `data` property - * - * The `response.data` property contains the serialized object data - * retrieved from the service request. For instance, for an - * Amazon DynamoDB `listTables` method call, the response data might - * look like: - * - * ``` - * > resp.data - * { TableNames: - * [ 'table1', 'table2', ... ] } - * ``` - * - * The `data` property can be null if an error occurs (see below). - * - * ## The `error` property - * - * In the event of a service error (or transfer error), the - * `response.error` property will be filled with the given - * error data in the form: - * - * ``` - * { code: 'SHORT_UNIQUE_ERROR_CODE', - * message: 'Some human readable error message' } - * ``` - * - * In the case of an error, the `data` property will be `null`. - * Note that if you handle events that can be in a failure state, - * you should always check whether `response.error` is set - * before attempting to access the `response.data` property. - * - * @!attribute data - * @readonly - * @!group Data Properties - * @note Inside of a {AWS.Request~httpData} event, this - * property contains a single raw packet instead of the - * full de-serialized service response. - * @return [Object] the de-serialized response data - * from the service. - * - * @!attribute error - * An structure containing information about a service - * or networking error. - * @readonly - * @!group Data Properties - * @note This attribute is only filled if a service or - * networking error occurs. - * @return [Error] - * * code [String] a unique short code representing the - * error that was emitted. - * * message [String] a longer human readable error message - * * retryable [Boolean] whether the error message is - * retryable. - * * statusCode [Numeric] in the case of a request that reached the service, - * this value contains the response status code. - * * time [Date] the date time object when the error occurred. - * * hostname [String] set when a networking error occurs to easily - * identify the endpoint of the request. - * * region [String] set when a networking error occurs to easily - * identify the region of the request. - * - * @!attribute requestId - * @readonly - * @!group Data Properties - * @return [String] the unique request ID associated with the response. - * Log this value when debugging requests for AWS support. - * - * @!attribute retryCount - * @readonly - * @!group Operation Properties - * @return [Integer] the number of retries that were - * attempted before the request was completed. - * - * @!attribute redirectCount - * @readonly - * @!group Operation Properties - * @return [Integer] the number of redirects that were - * followed before the request was completed. - * - * @!attribute httpResponse - * @readonly - * @!group HTTP Properties - * @return [AWS.HttpResponse] the raw HTTP response object - * containing the response headers and body information - * from the server. - * - * @see AWS.Request - */ -AWS.Response = inherit({ - - /** - * @api private - */ - constructor: function Response(request) { - this.request = request; - this.data = null; - this.error = null; - this.retryCount = 0; - this.redirectCount = 0; - this.httpResponse = new AWS.HttpResponse(); - if (request) { - this.maxRetries = request.service.numRetries(); - this.maxRedirects = request.service.config.maxRedirects; - } - }, - - /** - * Creates a new request for the next page of response data, calling the - * callback with the page data if a callback is provided. - * - * @callback callback function(err, data) - * Called when a page of data is returned from the next request. - * - * @param err [Error] an error object, if an error occurred in the request - * @param data [Object] the next page of data, or null, if there are no - * more pages left. - * @return [AWS.Request] the request object for the next page of data - * @return [null] if no callback is provided and there are no pages left - * to retrieve. - * @since v1.4.0 - */ - nextPage: function nextPage(callback) { - var config; - var service = this.request.service; - var operation = this.request.operation; - try { - config = service.paginationConfig(operation, true); - } catch (e) { this.error = e; } - - if (!this.hasNextPage()) { - if (callback) callback(this.error, null); - else if (this.error) throw this.error; - return null; - } - - var params = AWS.util.copy(this.request.params); - if (!this.nextPageTokens) { - return callback ? callback(null, null) : null; - } else { - var inputTokens = config.inputToken; - if (typeof inputTokens === 'string') inputTokens = [inputTokens]; - for (var i = 0; i < inputTokens.length; i++) { - params[inputTokens[i]] = this.nextPageTokens[i]; - } - return service.makeRequest(this.request.operation, params, callback); - } - }, - - /** - * @return [Boolean] whether more pages of data can be returned by further - * requests - * @since v1.4.0 - */ - hasNextPage: function hasNextPage() { - this.cacheNextPageTokens(); - if (this.nextPageTokens) return true; - if (this.nextPageTokens === undefined) return undefined; - else return false; - }, - - /** - * @api private - */ - cacheNextPageTokens: function cacheNextPageTokens() { - if (Object.prototype.hasOwnProperty.call(this, 'nextPageTokens')) return this.nextPageTokens; - this.nextPageTokens = undefined; - - var config = this.request.service.paginationConfig(this.request.operation); - if (!config) return this.nextPageTokens; - - this.nextPageTokens = null; - if (config.moreResults) { - if (!jmespath.search(this.data, config.moreResults)) { - return this.nextPageTokens; - } - } - - var exprs = config.outputToken; - if (typeof exprs === 'string') exprs = [exprs]; - AWS.util.arrayEach.call(this, exprs, function (expr) { - var output = jmespath.search(this.data, expr); - if (output) { - this.nextPageTokens = this.nextPageTokens || []; - this.nextPageTokens.push(output); - } - }); - - return this.nextPageTokens; - } - -}); - - -/***/ }), - -/***/ 81600: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var byteLength = AWS.util.string.byteLength; -var Buffer = AWS.util.Buffer; - -/** - * The managed uploader allows for easy and efficient uploading of buffers, - * blobs, or streams, using a configurable amount of concurrency to perform - * multipart uploads where possible. This abstraction also enables uploading - * streams of unknown size due to the use of multipart uploads. - * - * To construct a managed upload object, see the {constructor} function. - * - * ## Tracking upload progress - * - * The managed upload object can also track progress by attaching an - * 'httpUploadProgress' listener to the upload manager. This event is similar - * to {AWS.Request~httpUploadProgress} but groups all concurrent upload progress - * into a single event. See {AWS.S3.ManagedUpload~httpUploadProgress} for more - * information. - * - * ## Handling Multipart Cleanup - * - * By default, this class will automatically clean up any multipart uploads - * when an individual part upload fails. This behavior can be disabled in order - * to manually handle failures by setting the `leavePartsOnError` configuration - * option to `true` when initializing the upload object. - * - * @!event httpUploadProgress(progress) - * Triggered when the uploader has uploaded more data. - * @note The `total` property may not be set if the stream being uploaded has - * not yet finished chunking. In this case the `total` will be undefined - * until the total stream size is known. - * @note This event will not be emitted in Node.js 0.8.x. - * @param progress [map] An object containing the `loaded` and `total` bytes - * of the request and the `key` of the S3 object. Note that `total` may be undefined until the payload - * size is known. - * @context (see AWS.Request~send) - */ -AWS.S3.ManagedUpload = AWS.util.inherit({ - /** - * Creates a managed upload object with a set of configuration options. - * - * @note A "Body" parameter is required to be set prior to calling {send}. - * @note In Node.js, sending "Body" as {https://nodejs.org/dist/latest/docs/api/stream.html#stream_object_mode object-mode stream} - * may result in upload hangs. Using buffer stream is preferable. - * @option options params [map] a map of parameters to pass to the upload - * requests. The "Body" parameter is required to be specified either on - * the service or in the params option. - * @note ContentMD5 should not be provided when using the managed upload object. - * Instead, setting "computeChecksums" to true will enable automatic ContentMD5 generation - * by the managed upload object. - * @option options queueSize [Number] (4) the size of the concurrent queue - * manager to upload parts in parallel. Set to 1 for synchronous uploading - * of parts. Note that the uploader will buffer at most queueSize * partSize - * bytes into memory at any given time. - * @option options partSize [Number] (5mb) the size in bytes for each - * individual part to be uploaded. Adjust the part size to ensure the number - * of parts does not exceed {maxTotalParts}. See {minPartSize} for the - * minimum allowed part size. - * @option options leavePartsOnError [Boolean] (false) whether to abort the - * multipart upload if an error occurs. Set to true if you want to handle - * failures manually. - * @option options service [AWS.S3] an optional S3 service object to use for - * requests. This object might have bound parameters used by the uploader. - * @option options tags [Array] The tags to apply to the uploaded object. - * Each tag should have a `Key` and `Value` keys. - * @example Creating a default uploader for a stream object - * var upload = new AWS.S3.ManagedUpload({ - * params: {Bucket: 'bucket', Key: 'key', Body: stream} - * }); - * @example Creating an uploader with concurrency of 1 and partSize of 10mb - * var upload = new AWS.S3.ManagedUpload({ - * partSize: 10 * 1024 * 1024, queueSize: 1, - * params: {Bucket: 'bucket', Key: 'key', Body: stream} - * }); - * @example Creating an uploader with tags - * var upload = new AWS.S3.ManagedUpload({ - * params: {Bucket: 'bucket', Key: 'key', Body: stream}, - * tags: [{Key: 'tag1', Value: 'value1'}, {Key: 'tag2', Value: 'value2'}] - * }); - * @see send - */ - constructor: function ManagedUpload(options) { - var self = this; - AWS.SequentialExecutor.call(self); - self.body = null; - self.sliceFn = null; - self.callback = null; - self.parts = {}; - self.completeInfo = []; - self.fillQueue = function() { - self.callback(new Error('Unsupported body payload ' + typeof self.body)); - }; - - self.configure(options); - }, - - /** - * @api private - */ - configure: function configure(options) { - options = options || {}; - this.partSize = this.minPartSize; - - if (options.queueSize) this.queueSize = options.queueSize; - if (options.partSize) this.partSize = options.partSize; - if (options.leavePartsOnError) this.leavePartsOnError = true; - if (options.tags) { - if (!Array.isArray(options.tags)) { - throw new Error('Tags must be specified as an array; ' + - typeof options.tags + ' provided.'); - } - this.tags = options.tags; - } - - if (this.partSize < this.minPartSize) { - throw new Error('partSize must be greater than ' + - this.minPartSize); - } - - this.service = options.service; - this.bindServiceObject(options.params); - this.validateBody(); - this.adjustTotalBytes(); - }, - - /** - * @api private - */ - leavePartsOnError: false, - - /** - * @api private - */ - queueSize: 4, - - /** - * @api private - */ - partSize: null, - - /** - * @readonly - * @return [Number] the minimum number of bytes for an individual part - * upload. - */ - minPartSize: 1024 * 1024 * 5, - - /** - * @readonly - * @return [Number] the maximum allowed number of parts in a multipart upload. - */ - maxTotalParts: 10000, - - /** - * Initiates the managed upload for the payload. - * - * @callback callback function(err, data) - * @param err [Error] an error or null if no error occurred. - * @param data [map] The response data from the successful upload: - * * `Location` (String) the URL of the uploaded object - * * `ETag` (String) the ETag of the uploaded object - * * `Bucket` (String) the bucket to which the object was uploaded - * * `Key` (String) the key to which the object was uploaded - * @example Sending a managed upload object - * var params = {Bucket: 'bucket', Key: 'key', Body: stream}; - * var upload = new AWS.S3.ManagedUpload({params: params}); - * upload.send(function(err, data) { - * console.log(err, data); - * }); - */ - send: function(callback) { - var self = this; - self.failed = false; - self.callback = callback || function(err) { if (err) throw err; }; - - var runFill = true; - if (self.sliceFn) { - self.fillQueue = self.fillBuffer; - } else if (AWS.util.isNode()) { - var Stream = AWS.util.stream.Stream; - if (self.body instanceof Stream) { - runFill = false; - self.fillQueue = self.fillStream; - self.partBuffers = []; - self.body. - on('error', function(err) { self.cleanup(err); }). - on('readable', function() { self.fillQueue(); }). - on('end', function() { - self.isDoneChunking = true; - self.numParts = self.totalPartNumbers; - self.fillQueue.call(self); - - if (self.isDoneChunking && self.totalPartNumbers >= 1 && self.doneParts === self.numParts) { - self.finishMultiPart(); - } - }); - } - } - - if (runFill) self.fillQueue.call(self); - }, - - /** - * @!method promise() - * Returns a 'thenable' promise. - * - * Two callbacks can be provided to the `then` method on the returned promise. - * The first callback will be called if the promise is fulfilled, and the second - * callback will be called if the promise is rejected. - * @callback fulfilledCallback function(data) - * Called if the promise is fulfilled. - * @param data [map] The response data from the successful upload: - * `Location` (String) the URL of the uploaded object - * `ETag` (String) the ETag of the uploaded object - * `Bucket` (String) the bucket to which the object was uploaded - * `Key` (String) the key to which the object was uploaded - * @callback rejectedCallback function(err) - * Called if the promise is rejected. - * @param err [Error] an error or null if no error occurred. - * @return [Promise] A promise that represents the state of the upload request. - * @example Sending an upload request using promises. - * var upload = s3.upload({Bucket: 'bucket', Key: 'key', Body: stream}); - * var promise = upload.promise(); - * promise.then(function(data) { ... }, function(err) { ... }); - */ - - /** - * Aborts a managed upload, including all concurrent upload requests. - * @note By default, calling this function will cleanup a multipart upload - * if one was created. To leave the multipart upload around after aborting - * a request, configure `leavePartsOnError` to `true` in the {constructor}. - * @note Calling {abort} in the browser environment will not abort any requests - * that are already in flight. If a multipart upload was created, any parts - * not yet uploaded will not be sent, and the multipart upload will be cleaned up. - * @example Aborting an upload - * var params = { - * Bucket: 'bucket', Key: 'key', - * Body: Buffer.alloc(1024 * 1024 * 25) // 25MB payload - * }; - * var upload = s3.upload(params); - * upload.send(function (err, data) { - * if (err) console.log("Error:", err.code, err.message); - * else console.log(data); - * }); - * - * // abort request in 1 second - * setTimeout(upload.abort.bind(upload), 1000); - */ - abort: function() { - var self = this; - //abort putObject request - if (self.isDoneChunking === true && self.totalPartNumbers === 1 && self.singlePart) { - self.singlePart.abort(); - } else { - self.cleanup(AWS.util.error(new Error('Request aborted by user'), { - code: 'RequestAbortedError', retryable: false - })); - } - }, - - /** - * @api private - */ - validateBody: function validateBody() { - var self = this; - self.body = self.service.config.params.Body; - if (typeof self.body === 'string') { - self.body = AWS.util.buffer.toBuffer(self.body); - } else if (!self.body) { - throw new Error('params.Body is required'); - } - self.sliceFn = AWS.util.arraySliceFn(self.body); - }, - - /** - * @api private - */ - bindServiceObject: function bindServiceObject(params) { - params = params || {}; - var self = this; - // bind parameters to new service object - if (!self.service) { - self.service = new AWS.S3({params: params}); - } else { - // Create a new S3 client from the supplied client's constructor. - var service = self.service; - var config = AWS.util.copy(service.config); - config.signatureVersion = service.getSignatureVersion(); - self.service = new service.constructor.__super__(config); - self.service.config.params = - AWS.util.merge(self.service.config.params || {}, params); - Object.defineProperty(self.service, '_originalConfig', { - get: function() { return service._originalConfig; }, - enumerable: false, - configurable: true - }); - } - }, - - /** - * @api private - */ - adjustTotalBytes: function adjustTotalBytes() { - var self = this; - try { // try to get totalBytes - self.totalBytes = byteLength(self.body); - } catch (e) { } - - // try to adjust partSize if we know payload length - if (self.totalBytes) { - var newPartSize = Math.ceil(self.totalBytes / self.maxTotalParts); - if (newPartSize > self.partSize) self.partSize = newPartSize; - } else { - self.totalBytes = undefined; - } - }, - - /** - * @api private - */ - isDoneChunking: false, - - /** - * @api private - */ - partPos: 0, - - /** - * @api private - */ - totalChunkedBytes: 0, - - /** - * @api private - */ - totalUploadedBytes: 0, - - /** - * @api private - */ - totalBytes: undefined, - - /** - * @api private - */ - numParts: 0, - - /** - * @api private - */ - totalPartNumbers: 0, - - /** - * @api private - */ - activeParts: 0, - - /** - * @api private - */ - doneParts: 0, - - /** - * @api private - */ - parts: null, - - /** - * @api private - */ - completeInfo: null, - - /** - * @api private - */ - failed: false, - - /** - * @api private - */ - multipartReq: null, - - /** - * @api private - */ - partBuffers: null, - - /** - * @api private - */ - partBufferLength: 0, - - /** - * @api private - */ - fillBuffer: function fillBuffer() { - var self = this; - var bodyLen = byteLength(self.body); - - if (bodyLen === 0) { - self.isDoneChunking = true; - self.numParts = 1; - self.nextChunk(self.body); - return; - } - - while (self.activeParts < self.queueSize && self.partPos < bodyLen) { - var endPos = Math.min(self.partPos + self.partSize, bodyLen); - var buf = self.sliceFn.call(self.body, self.partPos, endPos); - self.partPos += self.partSize; - - if (byteLength(buf) < self.partSize || self.partPos === bodyLen) { - self.isDoneChunking = true; - self.numParts = self.totalPartNumbers + 1; - } - self.nextChunk(buf); - } - }, - - /** - * @api private - */ - fillStream: function fillStream() { - var self = this; - if (self.activeParts >= self.queueSize) return; - - var buf = self.body.read(self.partSize - self.partBufferLength) || - self.body.read(); - if (buf) { - self.partBuffers.push(buf); - self.partBufferLength += buf.length; - self.totalChunkedBytes += buf.length; - } - - if (self.partBufferLength >= self.partSize) { - // if we have single buffer we avoid copyfull concat - var pbuf = self.partBuffers.length === 1 ? - self.partBuffers[0] : Buffer.concat(self.partBuffers); - self.partBuffers = []; - self.partBufferLength = 0; - - // if we have more than partSize, push the rest back on the queue - if (pbuf.length > self.partSize) { - var rest = pbuf.slice(self.partSize); - self.partBuffers.push(rest); - self.partBufferLength += rest.length; - pbuf = pbuf.slice(0, self.partSize); - } - - self.nextChunk(pbuf); - } - - if (self.isDoneChunking && !self.isDoneSending) { - // if we have single buffer we avoid copyfull concat - pbuf = self.partBuffers.length === 1 ? - self.partBuffers[0] : Buffer.concat(self.partBuffers); - self.partBuffers = []; - self.partBufferLength = 0; - self.totalBytes = self.totalChunkedBytes; - self.isDoneSending = true; - - if (self.numParts === 0 || pbuf.length > 0) { - self.numParts++; - self.nextChunk(pbuf); - } - } - - self.body.read(0); - }, - - /** - * @api private - */ - nextChunk: function nextChunk(chunk) { - var self = this; - if (self.failed) return null; - - var partNumber = ++self.totalPartNumbers; - if (self.isDoneChunking && partNumber === 1) { - var params = {Body: chunk}; - if (this.tags) { - params.Tagging = this.getTaggingHeader(); - } - var req = self.service.putObject(params); - req._managedUpload = self; - req.on('httpUploadProgress', self.progress).send(self.finishSinglePart); - self.singlePart = req; //save the single part request - return null; - } else if (self.service.config.params.ContentMD5) { - var err = AWS.util.error(new Error('The Content-MD5 you specified is invalid for multi-part uploads.'), { - code: 'InvalidDigest', retryable: false - }); - - self.cleanup(err); - return null; - } - - if (self.completeInfo[partNumber] && self.completeInfo[partNumber].ETag !== null) { - return null; // Already uploaded this part. - } - - self.activeParts++; - if (!self.service.config.params.UploadId) { - - if (!self.multipartReq) { // create multipart - self.multipartReq = self.service.createMultipartUpload(); - self.multipartReq.on('success', function(resp) { - self.service.config.params.UploadId = resp.data.UploadId; - self.multipartReq = null; - }); - self.queueChunks(chunk, partNumber); - self.multipartReq.on('error', function(err) { - self.cleanup(err); - }); - self.multipartReq.send(); - } else { - self.queueChunks(chunk, partNumber); - } - } else { // multipart is created, just send - self.uploadPart(chunk, partNumber); - } - }, - - /** - * @api private - */ - getTaggingHeader: function getTaggingHeader() { - var kvPairStrings = []; - for (var i = 0; i < this.tags.length; i++) { - kvPairStrings.push(AWS.util.uriEscape(this.tags[i].Key) + '=' + - AWS.util.uriEscape(this.tags[i].Value)); - } - - return kvPairStrings.join('&'); - }, - - /** - * @api private - */ - uploadPart: function uploadPart(chunk, partNumber) { - var self = this; - - var partParams = { - Body: chunk, - ContentLength: AWS.util.string.byteLength(chunk), - PartNumber: partNumber - }; - - var partInfo = {ETag: null, PartNumber: partNumber}; - self.completeInfo[partNumber] = partInfo; - - var req = self.service.uploadPart(partParams); - self.parts[partNumber] = req; - req._lastUploadedBytes = 0; - req._managedUpload = self; - req.on('httpUploadProgress', self.progress); - req.send(function(err, data) { - delete self.parts[partParams.PartNumber]; - self.activeParts--; - - if (!err && (!data || !data.ETag)) { - var message = 'No access to ETag property on response.'; - if (AWS.util.isBrowser()) { - message += ' Check CORS configuration to expose ETag header.'; - } - - err = AWS.util.error(new Error(message), { - code: 'ETagMissing', retryable: false - }); - } - if (err) return self.cleanup(err); - //prevent sending part being returned twice (https://github.com/aws/aws-sdk-js/issues/2304) - if (self.completeInfo[partNumber] && self.completeInfo[partNumber].ETag !== null) return null; - partInfo.ETag = data.ETag; - self.doneParts++; - if (self.isDoneChunking && self.doneParts === self.numParts) { - self.finishMultiPart(); - } else { - self.fillQueue.call(self); - } - }); - }, - - /** - * @api private - */ - queueChunks: function queueChunks(chunk, partNumber) { - var self = this; - self.multipartReq.on('success', function() { - self.uploadPart(chunk, partNumber); - }); - }, - - /** - * @api private - */ - cleanup: function cleanup(err) { - var self = this; - if (self.failed) return; - - // clean up stream - if (typeof self.body.removeAllListeners === 'function' && - typeof self.body.resume === 'function') { - self.body.removeAllListeners('readable'); - self.body.removeAllListeners('end'); - self.body.resume(); - } - - // cleanup multipartReq listeners - if (self.multipartReq) { - self.multipartReq.removeAllListeners('success'); - self.multipartReq.removeAllListeners('error'); - self.multipartReq.removeAllListeners('complete'); - delete self.multipartReq; - } - - if (self.service.config.params.UploadId && !self.leavePartsOnError) { - self.service.abortMultipartUpload().send(); - } else if (self.leavePartsOnError) { - self.isDoneChunking = false; - } - - AWS.util.each(self.parts, function(partNumber, part) { - part.removeAllListeners('complete'); - part.abort(); - }); - - self.activeParts = 0; - self.partPos = 0; - self.numParts = 0; - self.totalPartNumbers = 0; - self.parts = {}; - self.failed = true; - self.callback(err); - }, - - /** - * @api private - */ - finishMultiPart: function finishMultiPart() { - var self = this; - var completeParams = { MultipartUpload: { Parts: self.completeInfo.slice(1) } }; - self.service.completeMultipartUpload(completeParams, function(err, data) { - if (err) { - return self.cleanup(err); - } - - if (data && typeof data.Location === 'string') { - data.Location = data.Location.replace(/%2F/g, '/'); - } - - if (Array.isArray(self.tags)) { - for (var i = 0; i < self.tags.length; i++) { - self.tags[i].Value = String(self.tags[i].Value); - } - self.service.putObjectTagging( - {Tagging: {TagSet: self.tags}}, - function(e, d) { - if (e) { - self.callback(e); - } else { - self.callback(e, data); - } - } - ); - } else { - self.callback(err, data); - } - }); - }, - - /** - * @api private - */ - finishSinglePart: function finishSinglePart(err, data) { - var upload = this.request._managedUpload; - var httpReq = this.request.httpRequest; - var endpoint = httpReq.endpoint; - if (err) return upload.callback(err); - data.Location = - [endpoint.protocol, '//', endpoint.host, httpReq.path].join(''); - data.key = this.request.params.Key; // will stay undocumented - data.Key = this.request.params.Key; - data.Bucket = this.request.params.Bucket; - upload.callback(err, data); - }, - - /** - * @api private - */ - progress: function progress(info) { - var upload = this._managedUpload; - if (this.operation === 'putObject') { - info.part = 1; - info.key = this.params.Key; - } else { - upload.totalUploadedBytes += info.loaded - this._lastUploadedBytes; - this._lastUploadedBytes = info.loaded; - info = { - loaded: upload.totalUploadedBytes, - total: upload.totalBytes, - part: this.params.PartNumber, - key: this.params.Key - }; - } - upload.emit('httpUploadProgress', [info]); - } -}); - -AWS.util.mixin(AWS.S3.ManagedUpload, AWS.SequentialExecutor); - -/** - * @api private - */ -AWS.S3.ManagedUpload.addPromisesToClass = function addPromisesToClass(PromiseDependency) { - this.prototype.promise = AWS.util.promisifyMethod('send', PromiseDependency); -}; - -/** - * @api private - */ -AWS.S3.ManagedUpload.deletePromisesFromClass = function deletePromisesFromClass() { - delete this.prototype.promise; -}; - -AWS.util.addPromises(AWS.S3.ManagedUpload); - -/** - * @api private - */ -module.exports = AWS.S3.ManagedUpload; - - -/***/ }), - -/***/ 55948: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -/** - * @api private - * @!method on(eventName, callback) - * Registers an event listener callback for the event given by `eventName`. - * Parameters passed to the callback function depend on the individual event - * being triggered. See the event documentation for those parameters. - * - * @param eventName [String] the event name to register the listener for - * @param callback [Function] the listener callback function - * @param toHead [Boolean] attach the listener callback to the head of callback array if set to true. - * Default to be false. - * @return [AWS.SequentialExecutor] the same object for chaining - */ -AWS.SequentialExecutor = AWS.util.inherit({ - - constructor: function SequentialExecutor() { - this._events = {}; - }, - - /** - * @api private - */ - listeners: function listeners(eventName) { - return this._events[eventName] ? this._events[eventName].slice(0) : []; - }, - - on: function on(eventName, listener, toHead) { - if (this._events[eventName]) { - toHead ? - this._events[eventName].unshift(listener) : - this._events[eventName].push(listener); - } else { - this._events[eventName] = [listener]; - } - return this; - }, - - onAsync: function onAsync(eventName, listener, toHead) { - listener._isAsync = true; - return this.on(eventName, listener, toHead); - }, - - removeListener: function removeListener(eventName, listener) { - var listeners = this._events[eventName]; - if (listeners) { - var length = listeners.length; - var position = -1; - for (var i = 0; i < length; ++i) { - if (listeners[i] === listener) { - position = i; - } - } - if (position > -1) { - listeners.splice(position, 1); - } - } - return this; - }, - - removeAllListeners: function removeAllListeners(eventName) { - if (eventName) { - delete this._events[eventName]; - } else { - this._events = {}; - } - return this; - }, - - /** - * @api private - */ - emit: function emit(eventName, eventArgs, doneCallback) { - if (!doneCallback) doneCallback = function() { }; - var listeners = this.listeners(eventName); - var count = listeners.length; - this.callListeners(listeners, eventArgs, doneCallback); - return count > 0; - }, - - /** - * @api private - */ - callListeners: function callListeners(listeners, args, doneCallback, prevError) { - var self = this; - var error = prevError || null; - - function callNextListener(err) { - if (err) { - error = AWS.util.error(error || new Error(), err); - if (self._haltHandlersOnError) { - return doneCallback.call(self, error); - } - } - self.callListeners(listeners, args, doneCallback, error); - } - - while (listeners.length > 0) { - var listener = listeners.shift(); - if (listener._isAsync) { // asynchronous listener - listener.apply(self, args.concat([callNextListener])); - return; // stop here, callNextListener will continue - } else { // synchronous listener - try { - listener.apply(self, args); - } catch (err) { - error = AWS.util.error(error || new Error(), err); - } - if (error && self._haltHandlersOnError) { - doneCallback.call(self, error); - return; - } - } - } - doneCallback.call(self, error); - }, - - /** - * Adds or copies a set of listeners from another list of - * listeners or SequentialExecutor object. - * - * @param listeners [map>, AWS.SequentialExecutor] - * a list of events and callbacks, or an event emitter object - * containing listeners to add to this emitter object. - * @return [AWS.SequentialExecutor] the emitter object, for chaining. - * @example Adding listeners from a map of listeners - * emitter.addListeners({ - * event1: [function() { ... }, function() { ... }], - * event2: [function() { ... }] - * }); - * emitter.emit('event1'); // emitter has event1 - * emitter.emit('event2'); // emitter has event2 - * @example Adding listeners from another emitter object - * var emitter1 = new AWS.SequentialExecutor(); - * emitter1.on('event1', function() { ... }); - * emitter1.on('event2', function() { ... }); - * var emitter2 = new AWS.SequentialExecutor(); - * emitter2.addListeners(emitter1); - * emitter2.emit('event1'); // emitter2 has event1 - * emitter2.emit('event2'); // emitter2 has event2 - */ - addListeners: function addListeners(listeners) { - var self = this; - - // extract listeners if parameter is an SequentialExecutor object - if (listeners._events) listeners = listeners._events; - - AWS.util.each(listeners, function(event, callbacks) { - if (typeof callbacks === 'function') callbacks = [callbacks]; - AWS.util.arrayEach(callbacks, function(callback) { - self.on(event, callback); - }); - }); - - return self; - }, - - /** - * Registers an event with {on} and saves the callback handle function - * as a property on the emitter object using a given `name`. - * - * @param name [String] the property name to set on this object containing - * the callback function handle so that the listener can be removed in - * the future. - * @param (see on) - * @return (see on) - * @example Adding a named listener DATA_CALLBACK - * var listener = function() { doSomething(); }; - * emitter.addNamedListener('DATA_CALLBACK', 'data', listener); - * - * // the following prints: true - * console.log(emitter.DATA_CALLBACK == listener); - */ - addNamedListener: function addNamedListener(name, eventName, callback, toHead) { - this[name] = callback; - this.addListener(eventName, callback, toHead); - return this; - }, - - /** - * @api private - */ - addNamedAsyncListener: function addNamedAsyncListener(name, eventName, callback, toHead) { - callback._isAsync = true; - return this.addNamedListener(name, eventName, callback, toHead); - }, - - /** - * Helper method to add a set of named listeners using - * {addNamedListener}. The callback contains a parameter - * with a handle to the `addNamedListener` method. - * - * @callback callback function(add) - * The callback function is called immediately in order to provide - * the `add` function to the block. This simplifies the addition of - * a large group of named listeners. - * @param add [Function] the {addNamedListener} function to call - * when registering listeners. - * @example Adding a set of named listeners - * emitter.addNamedListeners(function(add) { - * add('DATA_CALLBACK', 'data', function() { ... }); - * add('OTHER', 'otherEvent', function() { ... }); - * add('LAST', 'lastEvent', function() { ... }); - * }); - * - * // these properties are now set: - * emitter.DATA_CALLBACK; - * emitter.OTHER; - * emitter.LAST; - */ - addNamedListeners: function addNamedListeners(callback) { - var self = this; - callback( - function() { - self.addNamedListener.apply(self, arguments); - }, - function() { - self.addNamedAsyncListener.apply(self, arguments); - } - ); - return this; - } -}); - -/** - * {on} is the prefered method. - * @api private - */ -AWS.SequentialExecutor.prototype.addListener = AWS.SequentialExecutor.prototype.on; - -/** - * @api private - */ -module.exports = AWS.SequentialExecutor; - - -/***/ }), - -/***/ 68903: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var Api = __nccwpck_require__(17657); -var regionConfig = __nccwpck_require__(18262); - -var inherit = AWS.util.inherit; -var clientCount = 0; -var region_utils = __nccwpck_require__(99517); - -/** - * The service class representing an AWS service. - * - * @class_abstract This class is an abstract class. - * - * @!attribute apiVersions - * @return [Array] the list of API versions supported by this service. - * @readonly - */ -AWS.Service = inherit({ - /** - * Create a new service object with a configuration object - * - * @param config [map] a map of configuration options - */ - constructor: function Service(config) { - if (!this.loadServiceClass) { - throw AWS.util.error(new Error(), - 'Service must be constructed with `new\' operator'); - } - - if (config) { - if (config.region) { - var region = config.region; - if (region_utils.isFipsRegion(region)) { - config.region = region_utils.getRealRegion(region); - config.useFipsEndpoint = true; - } - if (region_utils.isGlobalRegion(region)) { - config.region = region_utils.getRealRegion(region); - } - } - if (typeof config.useDualstack === 'boolean' - && typeof config.useDualstackEndpoint !== 'boolean') { - config.useDualstackEndpoint = config.useDualstack; - } - } - - var ServiceClass = this.loadServiceClass(config || {}); - if (ServiceClass) { - var originalConfig = AWS.util.copy(config); - var svc = new ServiceClass(config); - Object.defineProperty(svc, '_originalConfig', { - get: function() { return originalConfig; }, - enumerable: false, - configurable: true - }); - svc._clientId = ++clientCount; - return svc; - } - this.initialize(config); - }, - - /** - * @api private - */ - initialize: function initialize(config) { - var svcConfig = AWS.config[this.serviceIdentifier]; - this.config = new AWS.Config(AWS.config); - if (svcConfig) this.config.update(svcConfig, true); - if (config) this.config.update(config, true); - - this.validateService(); - if (!this.config.endpoint) regionConfig.configureEndpoint(this); - - this.config.endpoint = this.endpointFromTemplate(this.config.endpoint); - this.setEndpoint(this.config.endpoint); - //enable attaching listeners to service client - AWS.SequentialExecutor.call(this); - AWS.Service.addDefaultMonitoringListeners(this); - if ((this.config.clientSideMonitoring || AWS.Service._clientSideMonitoring) && this.publisher) { - var publisher = this.publisher; - this.addNamedListener('PUBLISH_API_CALL', 'apiCall', function PUBLISH_API_CALL(event) { - process.nextTick(function() {publisher.eventHandler(event);}); - }); - this.addNamedListener('PUBLISH_API_ATTEMPT', 'apiCallAttempt', function PUBLISH_API_ATTEMPT(event) { - process.nextTick(function() {publisher.eventHandler(event);}); - }); - } - }, - - /** - * @api private - */ - validateService: function validateService() { - }, - - /** - * @api private - */ - loadServiceClass: function loadServiceClass(serviceConfig) { - var config = serviceConfig; - if (!AWS.util.isEmpty(this.api)) { - return null; - } else if (config.apiConfig) { - return AWS.Service.defineServiceApi(this.constructor, config.apiConfig); - } else if (!this.constructor.services) { - return null; - } else { - config = new AWS.Config(AWS.config); - config.update(serviceConfig, true); - var version = config.apiVersions[this.constructor.serviceIdentifier]; - version = version || config.apiVersion; - return this.getLatestServiceClass(version); - } - }, - - /** - * @api private - */ - getLatestServiceClass: function getLatestServiceClass(version) { - version = this.getLatestServiceVersion(version); - if (this.constructor.services[version] === null) { - AWS.Service.defineServiceApi(this.constructor, version); - } - - return this.constructor.services[version]; - }, - - /** - * @api private - */ - getLatestServiceVersion: function getLatestServiceVersion(version) { - if (!this.constructor.services || this.constructor.services.length === 0) { - throw new Error('No services defined on ' + - this.constructor.serviceIdentifier); - } - - if (!version) { - version = 'latest'; - } else if (AWS.util.isType(version, Date)) { - version = AWS.util.date.iso8601(version).split('T')[0]; - } - - if (Object.hasOwnProperty(this.constructor.services, version)) { - return version; - } - - var keys = Object.keys(this.constructor.services).sort(); - var selectedVersion = null; - for (var i = keys.length - 1; i >= 0; i--) { - // versions that end in "*" are not available on disk and can be - // skipped, so do not choose these as selectedVersions - if (keys[i][keys[i].length - 1] !== '*') { - selectedVersion = keys[i]; - } - if (keys[i].substr(0, 10) <= version) { - return selectedVersion; - } - } - - throw new Error('Could not find ' + this.constructor.serviceIdentifier + - ' API to satisfy version constraint `' + version + '\''); - }, - - /** - * @api private - */ - api: {}, - - /** - * @api private - */ - defaultRetryCount: 3, - - /** - * @api private - */ - customizeRequests: function customizeRequests(callback) { - if (!callback) { - this.customRequestHandler = null; - } else if (typeof callback === 'function') { - this.customRequestHandler = callback; - } else { - throw new Error('Invalid callback type \'' + typeof callback + '\' provided in customizeRequests'); - } - }, - - /** - * Calls an operation on a service with the given input parameters. - * - * @param operation [String] the name of the operation to call on the service. - * @param params [map] a map of input options for the operation - * @callback callback function(err, data) - * If a callback is supplied, it is called when a response is returned - * from the service. - * @param err [Error] the error object returned from the request. - * Set to `null` if the request is successful. - * @param data [Object] the de-serialized data returned from - * the request. Set to `null` if a request error occurs. - */ - makeRequest: function makeRequest(operation, params, callback) { - if (typeof params === 'function') { - callback = params; - params = null; - } - - params = params || {}; - if (this.config.params) { // copy only toplevel bound params - var rules = this.api.operations[operation]; - if (rules) { - params = AWS.util.copy(params); - AWS.util.each(this.config.params, function(key, value) { - if (rules.input.members[key]) { - if (params[key] === undefined || params[key] === null) { - params[key] = value; - } - } - }); - } - } - - var request = new AWS.Request(this, operation, params); - this.addAllRequestListeners(request); - this.attachMonitoringEmitter(request); - if (callback) request.send(callback); - return request; - }, - - /** - * Calls an operation on a service with the given input parameters, without - * any authentication data. This method is useful for "public" API operations. - * - * @param operation [String] the name of the operation to call on the service. - * @param params [map] a map of input options for the operation - * @callback callback function(err, data) - * If a callback is supplied, it is called when a response is returned - * from the service. - * @param err [Error] the error object returned from the request. - * Set to `null` if the request is successful. - * @param data [Object] the de-serialized data returned from - * the request. Set to `null` if a request error occurs. - */ - makeUnauthenticatedRequest: function makeUnauthenticatedRequest(operation, params, callback) { - if (typeof params === 'function') { - callback = params; - params = {}; - } - - var request = this.makeRequest(operation, params).toUnauthenticated(); - return callback ? request.send(callback) : request; - }, - - /** - * Waits for a given state - * - * @param state [String] the state on the service to wait for - * @param params [map] a map of parameters to pass with each request - * @option params $waiter [map] a map of configuration options for the waiter - * @option params $waiter.delay [Number] The number of seconds to wait between - * requests - * @option params $waiter.maxAttempts [Number] The maximum number of requests - * to send while waiting - * @callback callback function(err, data) - * If a callback is supplied, it is called when a response is returned - * from the service. - * @param err [Error] the error object returned from the request. - * Set to `null` if the request is successful. - * @param data [Object] the de-serialized data returned from - * the request. Set to `null` if a request error occurs. - */ - waitFor: function waitFor(state, params, callback) { - var waiter = new AWS.ResourceWaiter(this, state); - return waiter.wait(params, callback); - }, - - /** - * @api private - */ - addAllRequestListeners: function addAllRequestListeners(request) { - var list = [AWS.events, AWS.EventListeners.Core, this.serviceInterface(), - AWS.EventListeners.CorePost]; - for (var i = 0; i < list.length; i++) { - if (list[i]) request.addListeners(list[i]); - } - - // disable parameter validation - if (!this.config.paramValidation) { - request.removeListener('validate', - AWS.EventListeners.Core.VALIDATE_PARAMETERS); - } - - if (this.config.logger) { // add logging events - request.addListeners(AWS.EventListeners.Logger); - } - - this.setupRequestListeners(request); - // call prototype's customRequestHandler - if (typeof this.constructor.prototype.customRequestHandler === 'function') { - this.constructor.prototype.customRequestHandler(request); - } - // call instance's customRequestHandler - if (Object.prototype.hasOwnProperty.call(this, 'customRequestHandler') && typeof this.customRequestHandler === 'function') { - this.customRequestHandler(request); - } - }, - - /** - * Event recording metrics for a whole API call. - * @returns {object} a subset of api call metrics - * @api private - */ - apiCallEvent: function apiCallEvent(request) { - var api = request.service.api.operations[request.operation]; - var monitoringEvent = { - Type: 'ApiCall', - Api: api ? api.name : request.operation, - Version: 1, - Service: request.service.api.serviceId || request.service.api.endpointPrefix, - Region: request.httpRequest.region, - MaxRetriesExceeded: 0, - UserAgent: request.httpRequest.getUserAgent(), - }; - var response = request.response; - if (response.httpResponse.statusCode) { - monitoringEvent.FinalHttpStatusCode = response.httpResponse.statusCode; - } - if (response.error) { - var error = response.error; - var statusCode = response.httpResponse.statusCode; - if (statusCode > 299) { - if (error.code) monitoringEvent.FinalAwsException = error.code; - if (error.message) monitoringEvent.FinalAwsExceptionMessage = error.message; - } else { - if (error.code || error.name) monitoringEvent.FinalSdkException = error.code || error.name; - if (error.message) monitoringEvent.FinalSdkExceptionMessage = error.message; - } - } - return monitoringEvent; - }, - - /** - * Event recording metrics for an API call attempt. - * @returns {object} a subset of api call attempt metrics - * @api private - */ - apiAttemptEvent: function apiAttemptEvent(request) { - var api = request.service.api.operations[request.operation]; - var monitoringEvent = { - Type: 'ApiCallAttempt', - Api: api ? api.name : request.operation, - Version: 1, - Service: request.service.api.serviceId || request.service.api.endpointPrefix, - Fqdn: request.httpRequest.endpoint.hostname, - UserAgent: request.httpRequest.getUserAgent(), - }; - var response = request.response; - if (response.httpResponse.statusCode) { - monitoringEvent.HttpStatusCode = response.httpResponse.statusCode; - } - if ( - !request._unAuthenticated && - request.service.config.credentials && - request.service.config.credentials.accessKeyId - ) { - monitoringEvent.AccessKey = request.service.config.credentials.accessKeyId; - } - if (!response.httpResponse.headers) return monitoringEvent; - if (request.httpRequest.headers['x-amz-security-token']) { - monitoringEvent.SessionToken = request.httpRequest.headers['x-amz-security-token']; - } - if (response.httpResponse.headers['x-amzn-requestid']) { - monitoringEvent.XAmznRequestId = response.httpResponse.headers['x-amzn-requestid']; - } - if (response.httpResponse.headers['x-amz-request-id']) { - monitoringEvent.XAmzRequestId = response.httpResponse.headers['x-amz-request-id']; - } - if (response.httpResponse.headers['x-amz-id-2']) { - monitoringEvent.XAmzId2 = response.httpResponse.headers['x-amz-id-2']; - } - return monitoringEvent; - }, - - /** - * Add metrics of failed request. - * @api private - */ - attemptFailEvent: function attemptFailEvent(request) { - var monitoringEvent = this.apiAttemptEvent(request); - var response = request.response; - var error = response.error; - if (response.httpResponse.statusCode > 299 ) { - if (error.code) monitoringEvent.AwsException = error.code; - if (error.message) monitoringEvent.AwsExceptionMessage = error.message; - } else { - if (error.code || error.name) monitoringEvent.SdkException = error.code || error.name; - if (error.message) monitoringEvent.SdkExceptionMessage = error.message; - } - return monitoringEvent; - }, - - /** - * Attach listeners to request object to fetch metrics of each request - * and emit data object through \'ApiCall\' and \'ApiCallAttempt\' events. - * @api private - */ - attachMonitoringEmitter: function attachMonitoringEmitter(request) { - var attemptTimestamp; //timestamp marking the beginning of a request attempt - var attemptStartRealTime; //Start time of request attempt. Used to calculating attemptLatency - var attemptLatency; //latency from request sent out to http response reaching SDK - var callStartRealTime; //Start time of API call. Used to calculating API call latency - var attemptCount = 0; //request.retryCount is not reliable here - var region; //region cache region for each attempt since it can be updated in plase (e.g. s3) - var callTimestamp; //timestamp when the request is created - var self = this; - var addToHead = true; - - request.on('validate', function () { - callStartRealTime = AWS.util.realClock.now(); - callTimestamp = Date.now(); - }, addToHead); - request.on('sign', function () { - attemptStartRealTime = AWS.util.realClock.now(); - attemptTimestamp = Date.now(); - region = request.httpRequest.region; - attemptCount++; - }, addToHead); - request.on('validateResponse', function() { - attemptLatency = Math.round(AWS.util.realClock.now() - attemptStartRealTime); - }); - request.addNamedListener('API_CALL_ATTEMPT', 'success', function API_CALL_ATTEMPT() { - var apiAttemptEvent = self.apiAttemptEvent(request); - apiAttemptEvent.Timestamp = attemptTimestamp; - apiAttemptEvent.AttemptLatency = attemptLatency >= 0 ? attemptLatency : 0; - apiAttemptEvent.Region = region; - self.emit('apiCallAttempt', [apiAttemptEvent]); - }); - request.addNamedListener('API_CALL_ATTEMPT_RETRY', 'retry', function API_CALL_ATTEMPT_RETRY() { - var apiAttemptEvent = self.attemptFailEvent(request); - apiAttemptEvent.Timestamp = attemptTimestamp; - //attemptLatency may not be available if fail before response - attemptLatency = attemptLatency || - Math.round(AWS.util.realClock.now() - attemptStartRealTime); - apiAttemptEvent.AttemptLatency = attemptLatency >= 0 ? attemptLatency : 0; - apiAttemptEvent.Region = region; - self.emit('apiCallAttempt', [apiAttemptEvent]); - }); - request.addNamedListener('API_CALL', 'complete', function API_CALL() { - var apiCallEvent = self.apiCallEvent(request); - apiCallEvent.AttemptCount = attemptCount; - if (apiCallEvent.AttemptCount <= 0) return; - apiCallEvent.Timestamp = callTimestamp; - var latency = Math.round(AWS.util.realClock.now() - callStartRealTime); - apiCallEvent.Latency = latency >= 0 ? latency : 0; - var response = request.response; - if ( - response.error && - response.error.retryable && - typeof response.retryCount === 'number' && - typeof response.maxRetries === 'number' && - (response.retryCount >= response.maxRetries) - ) { - apiCallEvent.MaxRetriesExceeded = 1; - } - self.emit('apiCall', [apiCallEvent]); - }); - }, - - /** - * Override this method to setup any custom request listeners for each - * new request to the service. - * - * @method_abstract This is an abstract method. - */ - setupRequestListeners: function setupRequestListeners(request) { - }, - - /** - * Gets the signing name for a given request - * @api private - */ - getSigningName: function getSigningName() { - return this.api.signingName || this.api.endpointPrefix; - }, - - /** - * Gets the signer class for a given request - * @api private - */ - getSignerClass: function getSignerClass(request) { - var version; - // get operation authtype if present - var operation = null; - var authtype = ''; - if (request) { - var operations = request.service.api.operations || {}; - operation = operations[request.operation] || null; - authtype = operation ? operation.authtype : ''; - } - if (this.config.signatureVersion) { - version = this.config.signatureVersion; - } else if (authtype === 'v4' || authtype === 'v4-unsigned-body') { - version = 'v4'; - } else { - version = this.api.signatureVersion; - } - return AWS.Signers.RequestSigner.getVersion(version); - }, - - /** - * @api private - */ - serviceInterface: function serviceInterface() { - switch (this.api.protocol) { - case 'ec2': return AWS.EventListeners.Query; - case 'query': return AWS.EventListeners.Query; - case 'json': return AWS.EventListeners.Json; - case 'rest-json': return AWS.EventListeners.RestJson; - case 'rest-xml': return AWS.EventListeners.RestXml; - } - if (this.api.protocol) { - throw new Error('Invalid service `protocol\' ' + - this.api.protocol + ' in API config'); - } - }, - - /** - * @api private - */ - successfulResponse: function successfulResponse(resp) { - return resp.httpResponse.statusCode < 300; - }, - - /** - * How many times a failed request should be retried before giving up. - * the defaultRetryCount can be overriden by service classes. - * - * @api private - */ - numRetries: function numRetries() { - if (this.config.maxRetries !== undefined) { - return this.config.maxRetries; - } else { - return this.defaultRetryCount; - } - }, - - /** - * @api private - */ - retryDelays: function retryDelays(retryCount, err) { - return AWS.util.calculateRetryDelay(retryCount, this.config.retryDelayOptions, err); - }, - - /** - * @api private - */ - retryableError: function retryableError(error) { - if (this.timeoutError(error)) return true; - if (this.networkingError(error)) return true; - if (this.expiredCredentialsError(error)) return true; - if (this.throttledError(error)) return true; - if (error.statusCode >= 500) return true; - return false; - }, - - /** - * @api private - */ - networkingError: function networkingError(error) { - return error.code === 'NetworkingError'; - }, - - /** - * @api private - */ - timeoutError: function timeoutError(error) { - return error.code === 'TimeoutError'; - }, - - /** - * @api private - */ - expiredCredentialsError: function expiredCredentialsError(error) { - // TODO : this only handles *one* of the expired credential codes - return (error.code === 'ExpiredTokenException'); - }, - - /** - * @api private - */ - clockSkewError: function clockSkewError(error) { - switch (error.code) { - case 'RequestTimeTooSkewed': - case 'RequestExpired': - case 'InvalidSignatureException': - case 'SignatureDoesNotMatch': - case 'AuthFailure': - case 'RequestInTheFuture': - return true; - default: return false; - } - }, - - /** - * @api private - */ - getSkewCorrectedDate: function getSkewCorrectedDate() { - return new Date(Date.now() + this.config.systemClockOffset); - }, - - /** - * @api private - */ - applyClockOffset: function applyClockOffset(newServerTime) { - if (newServerTime) { - this.config.systemClockOffset = newServerTime - Date.now(); - } - }, - - /** - * @api private - */ - isClockSkewed: function isClockSkewed(newServerTime) { - if (newServerTime) { - return Math.abs(this.getSkewCorrectedDate().getTime() - newServerTime) >= 300000; - } - }, - - /** - * @api private - */ - throttledError: function throttledError(error) { - // this logic varies between services - if (error.statusCode === 429) return true; - switch (error.code) { - case 'ProvisionedThroughputExceededException': - case 'Throttling': - case 'ThrottlingException': - case 'RequestLimitExceeded': - case 'RequestThrottled': - case 'RequestThrottledException': - case 'TooManyRequestsException': - case 'TransactionInProgressException': //dynamodb - case 'EC2ThrottledException': - return true; - default: - return false; - } - }, - - /** - * @api private - */ - endpointFromTemplate: function endpointFromTemplate(endpoint) { - if (typeof endpoint !== 'string') return endpoint; - - var e = endpoint; - e = e.replace(/\{service\}/g, this.api.endpointPrefix); - e = e.replace(/\{region\}/g, this.config.region); - e = e.replace(/\{scheme\}/g, this.config.sslEnabled ? 'https' : 'http'); - return e; - }, - - /** - * @api private - */ - setEndpoint: function setEndpoint(endpoint) { - this.endpoint = new AWS.Endpoint(endpoint, this.config); - }, - - /** - * @api private - */ - paginationConfig: function paginationConfig(operation, throwException) { - var paginator = this.api.operations[operation].paginator; - if (!paginator) { - if (throwException) { - var e = new Error(); - throw AWS.util.error(e, 'No pagination configuration for ' + operation); - } - return null; - } - - return paginator; - } -}); - -AWS.util.update(AWS.Service, { - - /** - * Adds one method for each operation described in the api configuration - * - * @api private - */ - defineMethods: function defineMethods(svc) { - AWS.util.each(svc.prototype.api.operations, function iterator(method) { - if (svc.prototype[method]) return; - var operation = svc.prototype.api.operations[method]; - if (operation.authtype === 'none') { - svc.prototype[method] = function (params, callback) { - return this.makeUnauthenticatedRequest(method, params, callback); - }; - } else { - svc.prototype[method] = function (params, callback) { - return this.makeRequest(method, params, callback); - }; - } - }); - }, - - /** - * Defines a new Service class using a service identifier and list of versions - * including an optional set of features (functions) to apply to the class - * prototype. - * - * @param serviceIdentifier [String] the identifier for the service - * @param versions [Array] a list of versions that work with this - * service - * @param features [Object] an object to attach to the prototype - * @return [Class] the service class defined by this function. - */ - defineService: function defineService(serviceIdentifier, versions, features) { - AWS.Service._serviceMap[serviceIdentifier] = true; - if (!Array.isArray(versions)) { - features = versions; - versions = []; - } - - var svc = inherit(AWS.Service, features || {}); - - if (typeof serviceIdentifier === 'string') { - AWS.Service.addVersions(svc, versions); - - var identifier = svc.serviceIdentifier || serviceIdentifier; - svc.serviceIdentifier = identifier; - } else { // defineService called with an API - svc.prototype.api = serviceIdentifier; - AWS.Service.defineMethods(svc); - } - AWS.SequentialExecutor.call(this.prototype); - //util.clientSideMonitoring is only available in node - if (!this.prototype.publisher && AWS.util.clientSideMonitoring) { - var Publisher = AWS.util.clientSideMonitoring.Publisher; - var configProvider = AWS.util.clientSideMonitoring.configProvider; - var publisherConfig = configProvider(); - this.prototype.publisher = new Publisher(publisherConfig); - if (publisherConfig.enabled) { - //if csm is enabled in environment, SDK should send all metrics - AWS.Service._clientSideMonitoring = true; - } - } - AWS.SequentialExecutor.call(svc.prototype); - AWS.Service.addDefaultMonitoringListeners(svc.prototype); - return svc; - }, - - /** - * @api private - */ - addVersions: function addVersions(svc, versions) { - if (!Array.isArray(versions)) versions = [versions]; - - svc.services = svc.services || {}; - for (var i = 0; i < versions.length; i++) { - if (svc.services[versions[i]] === undefined) { - svc.services[versions[i]] = null; - } - } - - svc.apiVersions = Object.keys(svc.services).sort(); - }, - - /** - * @api private - */ - defineServiceApi: function defineServiceApi(superclass, version, apiConfig) { - var svc = inherit(superclass, { - serviceIdentifier: superclass.serviceIdentifier - }); - - function setApi(api) { - if (api.isApi) { - svc.prototype.api = api; - } else { - svc.prototype.api = new Api(api, { - serviceIdentifier: superclass.serviceIdentifier - }); - } - } - - if (typeof version === 'string') { - if (apiConfig) { - setApi(apiConfig); - } else { - try { - setApi(AWS.apiLoader(superclass.serviceIdentifier, version)); - } catch (err) { - throw AWS.util.error(err, { - message: 'Could not find API configuration ' + - superclass.serviceIdentifier + '-' + version - }); - } - } - if (!Object.prototype.hasOwnProperty.call(superclass.services, version)) { - superclass.apiVersions = superclass.apiVersions.concat(version).sort(); - } - superclass.services[version] = svc; - } else { - setApi(version); - } - - AWS.Service.defineMethods(svc); - return svc; - }, - - /** - * @api private - */ - hasService: function(identifier) { - return Object.prototype.hasOwnProperty.call(AWS.Service._serviceMap, identifier); - }, - - /** - * @param attachOn attach default monitoring listeners to object - * - * Each monitoring event should be emitted from service client to service constructor prototype and then - * to global service prototype like bubbling up. These default monitoring events listener will transfer - * the monitoring events to the upper layer. - * @api private - */ - addDefaultMonitoringListeners: function addDefaultMonitoringListeners(attachOn) { - attachOn.addNamedListener('MONITOR_EVENTS_BUBBLE', 'apiCallAttempt', function EVENTS_BUBBLE(event) { - var baseClass = Object.getPrototypeOf(attachOn); - if (baseClass._events) baseClass.emit('apiCallAttempt', [event]); - }); - attachOn.addNamedListener('CALL_EVENTS_BUBBLE', 'apiCall', function CALL_EVENTS_BUBBLE(event) { - var baseClass = Object.getPrototypeOf(attachOn); - if (baseClass._events) baseClass.emit('apiCall', [event]); - }); - }, - - /** - * @api private - */ - _serviceMap: {} -}); - -AWS.util.mixin(AWS.Service, AWS.SequentialExecutor); - -/** - * @api private - */ -module.exports = AWS.Service; - - -/***/ }), - -/***/ 4338: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -AWS.util.update(AWS.APIGateway.prototype, { -/** - * Sets the Accept header to application/json. - * - * @api private - */ - setAcceptHeader: function setAcceptHeader(req) { - var httpRequest = req.httpRequest; - if (!httpRequest.headers.Accept) { - httpRequest.headers['Accept'] = 'application/json'; - } - }, - - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - request.addListener('build', this.setAcceptHeader); - if (request.operation === 'getExport') { - var params = request.params || {}; - if (params.exportType === 'swagger') { - request.addListener('extractData', AWS.util.convertPayloadToString); - } - } - } -}); - - - -/***/ }), - -/***/ 95483: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -// pull in CloudFront signer -__nccwpck_require__(93260); - -AWS.util.update(AWS.CloudFront.prototype, { - - setupRequestListeners: function setupRequestListeners(request) { - request.addListener('extractData', AWS.util.hoistPayloadMember); - } - -}); - - -/***/ }), - -/***/ 48571: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -/** - * Constructs a service interface object. Each API operation is exposed as a - * function on service. - * - * ### Sending a Request Using CloudSearchDomain - * - * ```javascript - * var csd = new AWS.CloudSearchDomain({endpoint: 'my.host.tld'}); - * csd.search(params, function (err, data) { - * if (err) console.log(err, err.stack); // an error occurred - * else console.log(data); // successful response - * }); - * ``` - * - * ### Locking the API Version - * - * In order to ensure that the CloudSearchDomain object uses this specific API, - * you can construct the object by passing the `apiVersion` option to the - * constructor: - * - * ```javascript - * var csd = new AWS.CloudSearchDomain({ - * endpoint: 'my.host.tld', - * apiVersion: '2013-01-01' - * }); - * ``` - * - * You can also set the API version globally in `AWS.config.apiVersions` using - * the **cloudsearchdomain** service identifier: - * - * ```javascript - * AWS.config.apiVersions = { - * cloudsearchdomain: '2013-01-01', - * // other service API versions - * }; - * - * var csd = new AWS.CloudSearchDomain({endpoint: 'my.host.tld'}); - * ``` - * - * @note You *must* provide an `endpoint` configuration parameter when - * constructing this service. See {constructor} for more information. - * - * @!method constructor(options = {}) - * Constructs a service object. This object has one method for each - * API operation. - * - * @example Constructing a CloudSearchDomain object - * var csd = new AWS.CloudSearchDomain({endpoint: 'my.host.tld'}); - * @note You *must* provide an `endpoint` when constructing this service. - * @option (see AWS.Config.constructor) - * - * @service cloudsearchdomain - * @version 2013-01-01 - */ -AWS.util.update(AWS.CloudSearchDomain.prototype, { - /** - * @api private - */ - validateService: function validateService() { - if (!this.config.endpoint || this.config.endpoint.indexOf('{') >= 0) { - var msg = 'AWS.CloudSearchDomain requires an explicit ' + - '`endpoint\' configuration option.'; - throw AWS.util.error(new Error(), - {name: 'InvalidEndpoint', message: msg}); - } - }, - - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - request.removeListener('validate', - AWS.EventListeners.Core.VALIDATE_CREDENTIALS - ); - request.onAsync('validate', this.validateCredentials); - request.addListener('validate', this.updateRegion); - if (request.operation === 'search') { - request.addListener('build', this.convertGetToPost); - } - }, - - /** - * @api private - */ - validateCredentials: function(req, done) { - if (!req.service.api.signatureVersion) return done(); // none - req.service.config.getCredentials(function(err) { - if (err) { - req.removeListener('sign', AWS.EventListeners.Core.SIGN); - } - done(); - }); - }, - - /** - * @api private - */ - convertGetToPost: function(request) { - var httpRequest = request.httpRequest; - // convert queries to POST to avoid length restrictions - var path = httpRequest.path.split('?'); - httpRequest.method = 'POST'; - httpRequest.path = path[0]; - httpRequest.body = path[1]; - httpRequest.headers['Content-Length'] = httpRequest.body.length; - httpRequest.headers['Content-Type'] = 'application/x-www-form-urlencoded'; - }, - - /** - * @api private - */ - updateRegion: function updateRegion(request) { - var endpoint = request.httpRequest.endpoint.hostname; - var zones = endpoint.split('.'); - request.httpRequest.region = zones[1] || request.httpRequest.region; - } - -}); - - -/***/ }), - -/***/ 59050: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var rdsutil = __nccwpck_require__(30650); - -/** -* @api private -*/ -var crossRegionOperations = ['createDBCluster', 'copyDBClusterSnapshot']; - -AWS.util.update(AWS.DocDB.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - if ( - crossRegionOperations.indexOf(request.operation) !== -1 && - this.config.params && - this.config.params.SourceRegion && - request.params && - !request.params.SourceRegion - ) { - request.params.SourceRegion = this.config.params.SourceRegion; - } - rdsutil.setupRequestListeners(this, request, crossRegionOperations); - }, -}); - - -/***/ }), - -/***/ 17101: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -__nccwpck_require__(90030); - -AWS.util.update(AWS.DynamoDB.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - if (request.service.config.dynamoDbCrc32) { - request.removeListener('extractData', AWS.EventListeners.Json.EXTRACT_DATA); - request.addListener('extractData', this.checkCrc32); - request.addListener('extractData', AWS.EventListeners.Json.EXTRACT_DATA); - } - }, - - /** - * @api private - */ - checkCrc32: function checkCrc32(resp) { - if (!resp.httpResponse.streaming && !resp.request.service.crc32IsValid(resp)) { - resp.data = null; - resp.error = AWS.util.error(new Error(), { - code: 'CRC32CheckFailed', - message: 'CRC32 integrity check failed', - retryable: true - }); - resp.request.haltHandlersOnError(); - throw (resp.error); - } - }, - - /** - * @api private - */ - crc32IsValid: function crc32IsValid(resp) { - var crc = resp.httpResponse.headers['x-amz-crc32']; - if (!crc) return true; // no (valid) CRC32 header - return parseInt(crc, 10) === AWS.util.crypto.crc32(resp.httpResponse.body); - }, - - /** - * @api private - */ - defaultRetryCount: 10, - - /** - * @api private - */ - retryDelays: function retryDelays(retryCount, err) { - var retryDelayOptions = AWS.util.copy(this.config.retryDelayOptions); - - if (typeof retryDelayOptions.base !== 'number') { - retryDelayOptions.base = 50; // default for dynamodb - } - var delay = AWS.util.calculateRetryDelay(retryCount, retryDelayOptions, err); - return delay; - } -}); - - -/***/ }), - -/***/ 92501: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -AWS.util.update(AWS.EC2.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - request.removeListener('extractError', AWS.EventListeners.Query.EXTRACT_ERROR); - request.addListener('extractError', this.extractError); - - if (request.operation === 'copySnapshot') { - request.onAsync('validate', this.buildCopySnapshotPresignedUrl); - } - }, - - /** - * @api private - */ - buildCopySnapshotPresignedUrl: function buildCopySnapshotPresignedUrl(req, done) { - if (req.params.PresignedUrl || req._subRequest) { - return done(); - } - - req.params = AWS.util.copy(req.params); - req.params.DestinationRegion = req.service.config.region; - - var config = AWS.util.copy(req.service.config); - delete config.endpoint; - config.region = req.params.SourceRegion; - var svc = new req.service.constructor(config); - var newReq = svc[req.operation](req.params); - newReq._subRequest = true; - newReq.presign(function(err, url) { - if (err) done(err); - else { - req.params.PresignedUrl = url; - done(); - } - }); - }, - - /** - * @api private - */ - extractError: function extractError(resp) { - // EC2 nests the error code and message deeper than other AWS Query services. - var httpResponse = resp.httpResponse; - var data = new AWS.XML.Parser().parse(httpResponse.body.toString() || ''); - if (data.Errors) { - resp.error = AWS.util.error(new Error(), { - code: data.Errors.Error.Code, - message: data.Errors.Error.Message - }); - } else { - resp.error = AWS.util.error(new Error(), { - code: httpResponse.statusCode, - message: null - }); - } - resp.error.requestId = data.RequestID || null; - } -}); - - -/***/ }), - -/***/ 14472: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -AWS.util.update(AWS.Glacier.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - if (Array.isArray(request._events.validate)) { - request._events.validate.unshift(this.validateAccountId); - } else { - request.on('validate', this.validateAccountId); - } - request.removeListener('afterBuild', - AWS.EventListeners.Core.COMPUTE_SHA256); - request.on('build', this.addGlacierApiVersion); - request.on('build', this.addTreeHashHeaders); - }, - - /** - * @api private - */ - validateAccountId: function validateAccountId(request) { - if (request.params.accountId !== undefined) return; - request.params = AWS.util.copy(request.params); - request.params.accountId = '-'; - }, - - /** - * @api private - */ - addGlacierApiVersion: function addGlacierApiVersion(request) { - var version = request.service.api.apiVersion; - request.httpRequest.headers['x-amz-glacier-version'] = version; - }, - - /** - * @api private - */ - addTreeHashHeaders: function addTreeHashHeaders(request) { - if (request.params.body === undefined) return; - - var hashes = request.service.computeChecksums(request.params.body); - request.httpRequest.headers['X-Amz-Content-Sha256'] = hashes.linearHash; - - if (!request.httpRequest.headers['x-amz-sha256-tree-hash']) { - request.httpRequest.headers['x-amz-sha256-tree-hash'] = hashes.treeHash; - } - }, - - /** - * @!group Computing Checksums - */ - - /** - * Computes the SHA-256 linear and tree hash checksums for a given - * block of Buffer data. Pass the tree hash of the computed checksums - * as the checksum input to the {completeMultipartUpload} when performing - * a multi-part upload. - * - * @example Calculate checksum of 5.5MB data chunk - * var glacier = new AWS.Glacier(); - * var data = Buffer.alloc(5.5 * 1024 * 1024); - * data.fill('0'); // fill with zeros - * var results = glacier.computeChecksums(data); - * // Result: { linearHash: '68aff0c5a9...', treeHash: '154e26c78f...' } - * @param data [Buffer, String] data to calculate the checksum for - * @return [map] a map containing - * the linearHash and treeHash properties representing hex based digests - * of the respective checksums. - * @see completeMultipartUpload - */ - computeChecksums: function computeChecksums(data) { - if (!AWS.util.Buffer.isBuffer(data)) data = AWS.util.buffer.toBuffer(data); - - var mb = 1024 * 1024; - var hashes = []; - var hash = AWS.util.crypto.createHash('sha256'); - - // build leaf nodes in 1mb chunks - for (var i = 0; i < data.length; i += mb) { - var chunk = data.slice(i, Math.min(i + mb, data.length)); - hash.update(chunk); - hashes.push(AWS.util.crypto.sha256(chunk)); - } - - return { - linearHash: hash.digest('hex'), - treeHash: this.buildHashTree(hashes) - }; - }, - - /** - * @api private - */ - buildHashTree: function buildHashTree(hashes) { - // merge leaf nodes - while (hashes.length > 1) { - var tmpHashes = []; - for (var i = 0; i < hashes.length; i += 2) { - if (hashes[i + 1]) { - var tmpHash = AWS.util.buffer.alloc(64); - tmpHash.write(hashes[i], 0, 32, 'binary'); - tmpHash.write(hashes[i + 1], 32, 32, 'binary'); - tmpHashes.push(AWS.util.crypto.sha256(tmpHash)); - } else { - tmpHashes.push(hashes[i]); - } - } - hashes = tmpHashes; - } - - return AWS.util.crypto.toHex(hashes[0]); - } -}); - - -/***/ }), - -/***/ 27062: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -/** - * @api private - */ -var blobPayloadOutputOps = [ - 'deleteThingShadow', - 'getThingShadow', - 'updateThingShadow' -]; - -/** - * Constructs a service interface object. Each API operation is exposed as a - * function on service. - * - * ### Sending a Request Using IotData - * - * ```javascript - * var iotdata = new AWS.IotData({endpoint: 'my.host.tld'}); - * iotdata.getThingShadow(params, function (err, data) { - * if (err) console.log(err, err.stack); // an error occurred - * else console.log(data); // successful response - * }); - * ``` - * - * ### Locking the API Version - * - * In order to ensure that the IotData object uses this specific API, - * you can construct the object by passing the `apiVersion` option to the - * constructor: - * - * ```javascript - * var iotdata = new AWS.IotData({ - * endpoint: 'my.host.tld', - * apiVersion: '2015-05-28' - * }); - * ``` - * - * You can also set the API version globally in `AWS.config.apiVersions` using - * the **iotdata** service identifier: - * - * ```javascript - * AWS.config.apiVersions = { - * iotdata: '2015-05-28', - * // other service API versions - * }; - * - * var iotdata = new AWS.IotData({endpoint: 'my.host.tld'}); - * ``` - * - * @note You *must* provide an `endpoint` configuration parameter when - * constructing this service. See {constructor} for more information. - * - * @!method constructor(options = {}) - * Constructs a service object. This object has one method for each - * API operation. - * - * @example Constructing a IotData object - * var iotdata = new AWS.IotData({endpoint: 'my.host.tld'}); - * @note You *must* provide an `endpoint` when constructing this service. - * @option (see AWS.Config.constructor) - * - * @service iotdata - * @version 2015-05-28 - */ -AWS.util.update(AWS.IotData.prototype, { - /** - * @api private - */ - validateService: function validateService() { - if (!this.config.endpoint || this.config.endpoint.indexOf('{') >= 0) { - var msg = 'AWS.IotData requires an explicit ' + - '`endpoint\' configuration option.'; - throw AWS.util.error(new Error(), - {name: 'InvalidEndpoint', message: msg}); - } - }, - - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - request.addListener('validateResponse', this.validateResponseBody); - if (blobPayloadOutputOps.indexOf(request.operation) > -1) { - request.addListener('extractData', AWS.util.convertPayloadToString); - } - }, - - /** - * @api private - */ - validateResponseBody: function validateResponseBody(resp) { - var body = resp.httpResponse.body.toString() || '{}'; - var bodyCheck = body.trim(); - if (!bodyCheck || bodyCheck.charAt(0) !== '{') { - resp.httpResponse.body = ''; - } - } - -}); - - -/***/ }), - -/***/ 8452: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -AWS.util.update(AWS.Lambda.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - if (request.operation === 'invoke') { - request.addListener('extractData', AWS.util.convertPayloadToString); - } - } -}); - - - -/***/ }), - -/***/ 19174: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -AWS.util.update(AWS.MachineLearning.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - if (request.operation === 'predict') { - request.addListener('build', this.buildEndpoint); - } - }, - - /** - * Updates request endpoint from PredictEndpoint - * @api private - */ - buildEndpoint: function buildEndpoint(request) { - var url = request.params.PredictEndpoint; - if (url) { - request.httpRequest.endpoint = new AWS.Endpoint(url); - } - } - -}); - - -/***/ }), - -/***/ 73090: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var rdsutil = __nccwpck_require__(30650); - -/** -* @api private -*/ -var crossRegionOperations = ['createDBCluster', 'copyDBClusterSnapshot']; - -AWS.util.update(AWS.Neptune.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - if ( - crossRegionOperations.indexOf(request.operation) !== -1 && - this.config.params && - this.config.params.SourceRegion && - request.params && - !request.params.SourceRegion - ) { - request.params.SourceRegion = this.config.params.SourceRegion; - } - rdsutil.setupRequestListeners(this, request, crossRegionOperations); - }, -}); - - -/***/ }), - -/***/ 53199: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -__nccwpck_require__(44086); - - -/***/ }), - -/***/ 71928: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var rdsutil = __nccwpck_require__(30650); -__nccwpck_require__(16612); - /** - * @api private - */ - var crossRegionOperations = ['copyDBSnapshot', 'createDBInstanceReadReplica', 'createDBCluster', 'copyDBClusterSnapshot', 'startDBInstanceAutomatedBackupsReplication']; - - AWS.util.update(AWS.RDS.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - rdsutil.setupRequestListeners(this, request, crossRegionOperations); - }, - }); - - -/***/ }), - -/***/ 64070: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -AWS.util.update(AWS.RDSDataService.prototype, { - /** - * @return [Boolean] whether the error can be retried - * @api private - */ - retryableError: function retryableError(error) { - if (error.code === 'BadRequestException' && - error.message && - error.message.match(/^Communications link failure/) && - error.statusCode === 400) { - return true; - } else { - var _super = AWS.Service.prototype.retryableError; - return _super.call(this, error); - } - } -}); - - -/***/ }), - -/***/ 30650: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -var rdsutil = { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(service, request, crossRegionOperations) { - if (crossRegionOperations.indexOf(request.operation) !== -1 && - request.params.SourceRegion) { - request.params = AWS.util.copy(request.params); - if (request.params.PreSignedUrl || - request.params.SourceRegion === service.config.region) { - delete request.params.SourceRegion; - } else { - var doesParamValidation = !!service.config.paramValidation; - // remove the validate parameters listener so we can re-add it after we build the URL - if (doesParamValidation) { - request.removeListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS); - } - request.onAsync('validate', rdsutil.buildCrossRegionPresignedUrl); - if (doesParamValidation) { - request.addListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS); - } - } - } - }, - - /** - * @api private - */ - buildCrossRegionPresignedUrl: function buildCrossRegionPresignedUrl(req, done) { - var config = AWS.util.copy(req.service.config); - config.region = req.params.SourceRegion; - delete req.params.SourceRegion; - delete config.endpoint; - // relevant params for the operation will already be in req.params - delete config.params; - config.signatureVersion = 'v4'; - var destinationRegion = req.service.config.region; - - var svc = new req.service.constructor(config); - var newReq = svc[req.operation](AWS.util.copy(req.params)); - newReq.on('build', function addDestinationRegionParam(request) { - var httpRequest = request.httpRequest; - httpRequest.params.DestinationRegion = destinationRegion; - httpRequest.body = AWS.util.queryParamsToString(httpRequest.params); - }); - newReq.presign(function(err, url) { - if (err) done(err); - else { - req.params.PreSignedUrl = url; - done(); - } - }); - } -}; - -/** - * @api private - */ -module.exports = rdsutil; - - -/***/ }), - -/***/ 69627: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -AWS.util.update(AWS.Route53.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - request.on('build', this.sanitizeUrl); - }, - - /** - * @api private - */ - sanitizeUrl: function sanitizeUrl(request) { - var path = request.httpRequest.path; - request.httpRequest.path = path.replace(/\/%2F\w+%2F/, '/'); - }, - - /** - * @return [Boolean] whether the error can be retried - * @api private - */ - retryableError: function retryableError(error) { - if (error.code === 'PriorRequestNotComplete' && - error.statusCode === 400) { - return true; - } else { - var _super = AWS.Service.prototype.retryableError; - return _super.call(this, error); - } - } -}); - - -/***/ }), - -/***/ 26543: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var v4Credentials = __nccwpck_require__(62660); -var resolveRegionalEndpointsFlag = __nccwpck_require__(85566); -var s3util = __nccwpck_require__(35895); -var regionUtil = __nccwpck_require__(18262); - -// Pull in managed upload extension -__nccwpck_require__(81600); - -/** - * @api private - */ -var operationsWith200StatusCodeError = { - 'completeMultipartUpload': true, - 'copyObject': true, - 'uploadPartCopy': true -}; - -/** - * @api private - */ - var regionRedirectErrorCodes = [ - 'AuthorizationHeaderMalformed', // non-head operations on virtual-hosted global bucket endpoints - 'BadRequest', // head operations on virtual-hosted global bucket endpoints - 'PermanentRedirect', // non-head operations on path-style or regional endpoints - 301 // head operations on path-style or regional endpoints - ]; - -var OBJECT_LAMBDA_SERVICE = 's3-object-lambda'; - -AWS.util.update(AWS.S3.prototype, { - /** - * @api private - */ - getSignatureVersion: function getSignatureVersion(request) { - var defaultApiVersion = this.api.signatureVersion; - var userDefinedVersion = this._originalConfig ? this._originalConfig.signatureVersion : null; - var regionDefinedVersion = this.config.signatureVersion; - var isPresigned = request ? request.isPresigned() : false; - /* - 1) User defined version specified: - a) always return user defined version - 2) No user defined version specified: - a) If not using presigned urls, default to V4 - b) If using presigned urls, default to lowest version the region supports - */ - if (userDefinedVersion) { - userDefinedVersion = userDefinedVersion === 'v2' ? 's3' : userDefinedVersion; - return userDefinedVersion; - } - if (isPresigned !== true) { - defaultApiVersion = 'v4'; - } else if (regionDefinedVersion) { - defaultApiVersion = regionDefinedVersion; - } - return defaultApiVersion; - }, - - /** - * @api private - */ - getSigningName: function getSigningName(req) { - if (req && req.operation === 'writeGetObjectResponse') { - return OBJECT_LAMBDA_SERVICE; - } - - var _super = AWS.Service.prototype.getSigningName; - return (req && req._parsedArn && req._parsedArn.service) - ? req._parsedArn.service - : _super.call(this); - }, - - /** - * @api private - */ - getSignerClass: function getSignerClass(request) { - var signatureVersion = this.getSignatureVersion(request); - return AWS.Signers.RequestSigner.getVersion(signatureVersion); - }, - - /** - * @api private - */ - validateService: function validateService() { - var msg; - var messages = []; - - // default to us-east-1 when no region is provided - if (!this.config.region) this.config.region = 'us-east-1'; - - if (!this.config.endpoint && this.config.s3BucketEndpoint) { - messages.push('An endpoint must be provided when configuring ' + - '`s3BucketEndpoint` to true.'); - } - if (messages.length === 1) { - msg = messages[0]; - } else if (messages.length > 1) { - msg = 'Multiple configuration errors:\n' + messages.join('\n'); - } - if (msg) { - throw AWS.util.error(new Error(), - {name: 'InvalidEndpoint', message: msg}); - } - }, - - /** - * @api private - */ - shouldDisableBodySigning: function shouldDisableBodySigning(request) { - var signerClass = this.getSignerClass(); - if (this.config.s3DisableBodySigning === true && signerClass === AWS.Signers.V4 - && request.httpRequest.endpoint.protocol === 'https:') { - return true; - } - return false; - }, - - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - var prependListener = true; - request.addListener('validate', this.validateScheme); - request.addListener('validate', this.validateBucketName, prependListener); - request.addListener('validate', this.optInUsEast1RegionalEndpoint, prependListener); - - request.removeListener('validate', - AWS.EventListeners.Core.VALIDATE_REGION); - request.addListener('build', this.addContentType); - request.addListener('build', this.computeContentMd5); - request.addListener('build', this.computeSseCustomerKeyMd5); - request.addListener('build', this.populateURI); - request.addListener('afterBuild', this.addExpect100Continue); - request.addListener('extractError', this.extractError); - request.addListener('extractData', AWS.util.hoistPayloadMember); - request.addListener('extractData', this.extractData); - request.addListener('extractData', this.extractErrorFrom200Response); - request.addListener('beforePresign', this.prepareSignedUrl); - if (this.shouldDisableBodySigning(request)) { - request.removeListener('afterBuild', AWS.EventListeners.Core.COMPUTE_SHA256); - request.addListener('afterBuild', this.disableBodySigning); - } - //deal with ARNs supplied to Bucket - if (request.operation !== 'createBucket' && s3util.isArnInParam(request, 'Bucket')) { - // avoid duplicate parsing in the future - request._parsedArn = AWS.util.ARN.parse(request.params.Bucket); - - request.removeListener('validate', this.validateBucketName); - request.removeListener('build', this.populateURI); - if (request._parsedArn.service === 's3') { - request.addListener('validate', s3util.validateS3AccessPointArn); - request.addListener('validate', this.validateArnResourceType); - request.addListener('validate', this.validateArnRegion); - } else if (request._parsedArn.service === 's3-outposts') { - request.addListener('validate', s3util.validateOutpostsAccessPointArn); - request.addListener('validate', s3util.validateOutpostsArn); - request.addListener('validate', s3util.validateArnRegion); - } - request.addListener('validate', s3util.validateArnAccount); - request.addListener('validate', s3util.validateArnService); - request.addListener('build', this.populateUriFromAccessPointArn); - request.addListener('build', s3util.validatePopulateUriFromArn); - return; - } - //listeners regarding region inference - request.addListener('validate', this.validateBucketEndpoint); - request.addListener('validate', this.correctBucketRegionFromCache); - request.onAsync('extractError', this.requestBucketRegion); - if (AWS.util.isBrowser()) { - request.onAsync('retry', this.reqRegionForNetworkingError); - } - }, - - /** - * @api private - */ - validateScheme: function(req) { - var params = req.params, - scheme = req.httpRequest.endpoint.protocol, - sensitive = params.SSECustomerKey || params.CopySourceSSECustomerKey; - if (sensitive && scheme !== 'https:') { - var msg = 'Cannot send SSE keys over HTTP. Set \'sslEnabled\'' + - 'to \'true\' in your configuration'; - throw AWS.util.error(new Error(), - { code: 'ConfigError', message: msg }); - } - }, - - /** - * @api private - */ - validateBucketEndpoint: function(req) { - if (!req.params.Bucket && req.service.config.s3BucketEndpoint) { - var msg = 'Cannot send requests to root API with `s3BucketEndpoint` set.'; - throw AWS.util.error(new Error(), - { code: 'ConfigError', message: msg }); - } - }, - - /** - * @api private - */ - validateArnRegion: function validateArnRegion(req) { - s3util.validateArnRegion(req, { allowFipsEndpoint: true }); - }, - - /** - * Validate resource-type supplied in S3 ARN - */ - validateArnResourceType: function validateArnResourceType(req) { - var resource = req._parsedArn.resource; - - if ( - resource.indexOf('accesspoint:') !== 0 && - resource.indexOf('accesspoint/') !== 0 - ) { - throw AWS.util.error(new Error(), { - code: 'InvalidARN', - message: 'ARN resource should begin with \'accesspoint/\'' - }); - } - }, - - /** - * @api private - */ - validateBucketName: function validateBucketName(req) { - var service = req.service; - var signatureVersion = service.getSignatureVersion(req); - var bucket = req.params && req.params.Bucket; - var key = req.params && req.params.Key; - var slashIndex = bucket && bucket.indexOf('/'); - if (bucket && slashIndex >= 0) { - if (typeof key === 'string' && slashIndex > 0) { - req.params = AWS.util.copy(req.params); - // Need to include trailing slash to match sigv2 behavior - var prefix = bucket.substr(slashIndex + 1) || ''; - req.params.Key = prefix + '/' + key; - req.params.Bucket = bucket.substr(0, slashIndex); - } else if (signatureVersion === 'v4') { - var msg = 'Bucket names cannot contain forward slashes. Bucket: ' + bucket; - throw AWS.util.error(new Error(), - { code: 'InvalidBucket', message: msg }); - } - } - }, - - /** - * @api private - */ - isValidAccelerateOperation: function isValidAccelerateOperation(operation) { - var invalidOperations = [ - 'createBucket', - 'deleteBucket', - 'listBuckets' - ]; - return invalidOperations.indexOf(operation) === -1; - }, - - /** - * When us-east-1 region endpoint configuration is set, in stead of sending request to - * global endpoint(e.g. 's3.amazonaws.com'), we will send request to - * 's3.us-east-1.amazonaws.com'. - * @api private - */ - optInUsEast1RegionalEndpoint: function optInUsEast1RegionalEndpoint(req) { - var service = req.service; - var config = service.config; - config.s3UsEast1RegionalEndpoint = resolveRegionalEndpointsFlag(service._originalConfig, { - env: 'AWS_S3_US_EAST_1_REGIONAL_ENDPOINT', - sharedConfig: 's3_us_east_1_regional_endpoint', - clientConfig: 's3UsEast1RegionalEndpoint' - }); - if ( - !(service._originalConfig || {}).endpoint && - req.httpRequest.region === 'us-east-1' && - config.s3UsEast1RegionalEndpoint === 'regional' && - req.httpRequest.endpoint.hostname.indexOf('s3.amazonaws.com') >= 0 - ) { - var insertPoint = config.endpoint.indexOf('.amazonaws.com'); - regionalEndpoint = config.endpoint.substring(0, insertPoint) + - '.us-east-1' + config.endpoint.substring(insertPoint); - req.httpRequest.updateEndpoint(regionalEndpoint); - } - }, - - /** - * S3 prefers dns-compatible bucket names to be moved from the uri path - * to the hostname as a sub-domain. This is not possible, even for dns-compat - * buckets when using SSL and the bucket name contains a dot ('.'). The - * ssl wildcard certificate is only 1-level deep. - * - * @api private - */ - populateURI: function populateURI(req) { - var httpRequest = req.httpRequest; - var b = req.params.Bucket; - var service = req.service; - var endpoint = httpRequest.endpoint; - if (b) { - if (!service.pathStyleBucketName(b)) { - if (service.config.useAccelerateEndpoint && service.isValidAccelerateOperation(req.operation)) { - if (service.config.useDualstackEndpoint) { - endpoint.hostname = b + '.s3-accelerate.dualstack.amazonaws.com'; - } else { - endpoint.hostname = b + '.s3-accelerate.amazonaws.com'; - } - } else if (!service.config.s3BucketEndpoint) { - endpoint.hostname = - b + '.' + endpoint.hostname; - } - - var port = endpoint.port; - if (port !== 80 && port !== 443) { - endpoint.host = endpoint.hostname + ':' + - endpoint.port; - } else { - endpoint.host = endpoint.hostname; - } - - httpRequest.virtualHostedBucket = b; // needed for signing the request - service.removeVirtualHostedBucketFromPath(req); - } - } - }, - - /** - * Takes the bucket name out of the path if bucket is virtual-hosted - * - * @api private - */ - removeVirtualHostedBucketFromPath: function removeVirtualHostedBucketFromPath(req) { - var httpRequest = req.httpRequest; - var bucket = httpRequest.virtualHostedBucket; - if (bucket && httpRequest.path) { - if (req.params && req.params.Key) { - var encodedS3Key = '/' + AWS.util.uriEscapePath(req.params.Key); - if (httpRequest.path.indexOf(encodedS3Key) === 0 && (httpRequest.path.length === encodedS3Key.length || httpRequest.path[encodedS3Key.length] === '?')) { - //path only contains key or path contains only key and querystring - return; - } - } - httpRequest.path = httpRequest.path.replace(new RegExp('/' + bucket), ''); - if (httpRequest.path[0] !== '/') { - httpRequest.path = '/' + httpRequest.path; - } - } - }, - - /** - * When user supply an access point ARN in the Bucket parameter, we need to - * populate the URI according to the ARN. - */ - populateUriFromAccessPointArn: function populateUriFromAccessPointArn(req) { - var accessPointArn = req._parsedArn; - - var isOutpostArn = accessPointArn.service === 's3-outposts'; - var isObjectLambdaArn = accessPointArn.service === 's3-object-lambda'; - - var outpostsSuffix = isOutpostArn ? '.' + accessPointArn.outpostId: ''; - var serviceName = isOutpostArn ? 's3-outposts': 's3-accesspoint'; - var fipsSuffix = !isOutpostArn && req.service.config.useFipsEndpoint ? '-fips': ''; - var dualStackSuffix = !isOutpostArn && - req.service.config.useDualstackEndpoint ? '.dualstack' : ''; - - var endpoint = req.httpRequest.endpoint; - var dnsSuffix = regionUtil.getEndpointSuffix(accessPointArn.region); - var useArnRegion = req.service.config.s3UseArnRegion; - - endpoint.hostname = [ - accessPointArn.accessPoint + '-' + accessPointArn.accountId + outpostsSuffix, - serviceName + fipsSuffix + dualStackSuffix, - useArnRegion ? accessPointArn.region : req.service.config.region, - dnsSuffix - ].join('.'); - - if (isObjectLambdaArn) { - // should be in the format: "accesspoint/${accesspointName}" - var serviceName = 's3-object-lambda'; - var accesspointName = accessPointArn.resource.split('/')[1]; - var fipsSuffix = req.service.config.useFipsEndpoint ? '-fips': ''; - endpoint.hostname = [ - accesspointName + '-' + accessPointArn.accountId, - serviceName + fipsSuffix, - useArnRegion ? accessPointArn.region : req.service.config.region, - dnsSuffix - ].join('.'); - } - endpoint.host = endpoint.hostname; - var encodedArn = AWS.util.uriEscape(req.params.Bucket); - var path = req.httpRequest.path; - //remove the Bucket value from path - req.httpRequest.path = path.replace(new RegExp('/' + encodedArn), ''); - if (req.httpRequest.path[0] !== '/') { - req.httpRequest.path = '/' + req.httpRequest.path; - } - req.httpRequest.region = accessPointArn.region; //region used to sign - }, - - /** - * Adds Expect: 100-continue header if payload is greater-or-equal 1MB - * @api private - */ - addExpect100Continue: function addExpect100Continue(req) { - var len = req.httpRequest.headers['Content-Length']; - if (AWS.util.isNode() && (len >= 1024 * 1024 || req.params.Body instanceof AWS.util.stream.Stream)) { - req.httpRequest.headers['Expect'] = '100-continue'; - } - }, - - /** - * Adds a default content type if none is supplied. - * - * @api private - */ - addContentType: function addContentType(req) { - var httpRequest = req.httpRequest; - if (httpRequest.method === 'GET' || httpRequest.method === 'HEAD') { - // Content-Type is not set in GET/HEAD requests - delete httpRequest.headers['Content-Type']; - return; - } - - if (!httpRequest.headers['Content-Type']) { // always have a Content-Type - httpRequest.headers['Content-Type'] = 'application/octet-stream'; - } - - var contentType = httpRequest.headers['Content-Type']; - if (AWS.util.isBrowser()) { - if (typeof httpRequest.body === 'string' && !contentType.match(/;\s*charset=/)) { - var charset = '; charset=UTF-8'; - httpRequest.headers['Content-Type'] += charset; - } else { - var replaceFn = function(_, prefix, charsetName) { - return prefix + charsetName.toUpperCase(); - }; - - httpRequest.headers['Content-Type'] = - contentType.replace(/(;\s*charset=)(.+)$/, replaceFn); - } - } - }, - - /** - * Checks whether checksums should be computed for the request if it's not - * already set by {AWS.EventListeners.Core.COMPUTE_CHECKSUM}. It depends on - * whether {AWS.Config.computeChecksums} is set. - * - * @param req [AWS.Request] the request to check against - * @return [Boolean] whether to compute checksums for a request. - * @api private - */ - willComputeChecksums: function willComputeChecksums(req) { - var rules = req.service.api.operations[req.operation].input.members; - var body = req.httpRequest.body; - var needsContentMD5 = rules.ContentMD5 && - !req.params.ContentMD5 && - body && - (AWS.util.Buffer.isBuffer(req.httpRequest.body) || typeof req.httpRequest.body === 'string'); - - // Sha256 signing disabled, and not a presigned url - if (needsContentMD5 && req.service.shouldDisableBodySigning(req) && !req.isPresigned()) { - return true; - } - - // SigV2 and presign, for backwards compatibility purpose. - if (needsContentMD5 && this.getSignatureVersion(req) === 's3' && req.isPresigned()) { - return true; - } - - return false; - }, - - /** - * A listener that computes the Content-MD5 and sets it in the header. - * This listener is to support S3-specific features like - * s3DisableBodySigning and SigV2 presign. Content MD5 logic for SigV4 is - * handled in AWS.EventListeners.Core.COMPUTE_CHECKSUM - * - * @api private - */ - computeContentMd5: function computeContentMd5(req) { - if (req.service.willComputeChecksums(req)) { - var md5 = AWS.util.crypto.md5(req.httpRequest.body, 'base64'); - req.httpRequest.headers['Content-MD5'] = md5; - } - }, - - /** - * @api private - */ - computeSseCustomerKeyMd5: function computeSseCustomerKeyMd5(req) { - var keys = { - SSECustomerKey: 'x-amz-server-side-encryption-customer-key-MD5', - CopySourceSSECustomerKey: 'x-amz-copy-source-server-side-encryption-customer-key-MD5' - }; - AWS.util.each(keys, function(key, header) { - if (req.params[key]) { - var value = AWS.util.crypto.md5(req.params[key], 'base64'); - req.httpRequest.headers[header] = value; - } - }); - }, - - /** - * Returns true if the bucket name should be left in the URI path for - * a request to S3. This function takes into account the current - * endpoint protocol (e.g. http or https). - * - * @api private - */ - pathStyleBucketName: function pathStyleBucketName(bucketName) { - // user can force path style requests via the configuration - if (this.config.s3ForcePathStyle) return true; - if (this.config.s3BucketEndpoint) return false; - - if (s3util.dnsCompatibleBucketName(bucketName)) { - return (this.config.sslEnabled && bucketName.match(/\./)) ? true : false; - } else { - return true; // not dns compatible names must always use path style - } - }, - - /** - * For COPY operations, some can be error even with status code 200. - * SDK treats the response as exception when response body indicates - * an exception or body is empty. - * - * @api private - */ - extractErrorFrom200Response: function extractErrorFrom200Response(resp) { - if (!operationsWith200StatusCodeError[resp.request.operation]) return; - var httpResponse = resp.httpResponse; - if (httpResponse.body && httpResponse.body.toString().match('')) { - // Response body with '...' indicates an exception. - // Get S3 client object. In ManagedUpload, this.service refers to - // S3 client object. - resp.data = null; - var service = this.service ? this.service : this; - service.extractError(resp); - throw resp.error; - } else if (!httpResponse.body || !httpResponse.body.toString().match(/<[\w_]/)) { - // When body is empty or incomplete, S3 might stop the request on detecting client - // side aborting the request. - resp.data = null; - throw AWS.util.error(new Error(), { - code: 'InternalError', - message: 'S3 aborted request' - }); - } - }, - - /** - * @return [Boolean] whether the error can be retried - * @api private - */ - retryableError: function retryableError(error, request) { - if (operationsWith200StatusCodeError[request.operation] && - error.statusCode === 200) { - return true; - } else if (request._requestRegionForBucket && - request.service.bucketRegionCache[request._requestRegionForBucket]) { - return false; - } else if (error && error.code === 'RequestTimeout') { - return true; - } else if (error && - regionRedirectErrorCodes.indexOf(error.code) != -1 && - error.region && error.region != request.httpRequest.region) { - request.httpRequest.region = error.region; - if (error.statusCode === 301) { - request.service.updateReqBucketRegion(request); - } - return true; - } else { - var _super = AWS.Service.prototype.retryableError; - return _super.call(this, error, request); - } - }, - - /** - * Updates httpRequest with region. If region is not provided, then - * the httpRequest will be updated based on httpRequest.region - * - * @api private - */ - updateReqBucketRegion: function updateReqBucketRegion(request, region) { - var httpRequest = request.httpRequest; - if (typeof region === 'string' && region.length) { - httpRequest.region = region; - } - if (!httpRequest.endpoint.host.match(/s3(?!-accelerate).*\.amazonaws\.com$/)) { - return; - } - var service = request.service; - var s3Config = service.config; - var s3BucketEndpoint = s3Config.s3BucketEndpoint; - if (s3BucketEndpoint) { - delete s3Config.s3BucketEndpoint; - } - var newConfig = AWS.util.copy(s3Config); - delete newConfig.endpoint; - newConfig.region = httpRequest.region; - - httpRequest.endpoint = (new AWS.S3(newConfig)).endpoint; - service.populateURI(request); - s3Config.s3BucketEndpoint = s3BucketEndpoint; - httpRequest.headers.Host = httpRequest.endpoint.host; - - if (request._asm.currentState === 'validate') { - request.removeListener('build', service.populateURI); - request.addListener('build', service.removeVirtualHostedBucketFromPath); - } - }, - - /** - * Provides a specialized parser for getBucketLocation -- all other - * operations are parsed by the super class. - * - * @api private - */ - extractData: function extractData(resp) { - var req = resp.request; - if (req.operation === 'getBucketLocation') { - var match = resp.httpResponse.body.toString().match(/>(.+)<\/Location/); - delete resp.data['_']; - if (match) { - resp.data.LocationConstraint = match[1]; - } else { - resp.data.LocationConstraint = ''; - } - } - var bucket = req.params.Bucket || null; - if (req.operation === 'deleteBucket' && typeof bucket === 'string' && !resp.error) { - req.service.clearBucketRegionCache(bucket); - } else { - var headers = resp.httpResponse.headers || {}; - var region = headers['x-amz-bucket-region'] || null; - if (!region && req.operation === 'createBucket' && !resp.error) { - var createBucketConfiguration = req.params.CreateBucketConfiguration; - if (!createBucketConfiguration) { - region = 'us-east-1'; - } else if (createBucketConfiguration.LocationConstraint === 'EU') { - region = 'eu-west-1'; - } else { - region = createBucketConfiguration.LocationConstraint; - } - } - if (region) { - if (bucket && region !== req.service.bucketRegionCache[bucket]) { - req.service.bucketRegionCache[bucket] = region; - } - } - } - req.service.extractRequestIds(resp); - }, - - /** - * Extracts an error object from the http response. - * - * @api private - */ - extractError: function extractError(resp) { - var codes = { - 304: 'NotModified', - 403: 'Forbidden', - 400: 'BadRequest', - 404: 'NotFound' - }; - - var req = resp.request; - var code = resp.httpResponse.statusCode; - var body = resp.httpResponse.body || ''; - - var headers = resp.httpResponse.headers || {}; - var region = headers['x-amz-bucket-region'] || null; - var bucket = req.params.Bucket || null; - var bucketRegionCache = req.service.bucketRegionCache; - if (region && bucket && region !== bucketRegionCache[bucket]) { - bucketRegionCache[bucket] = region; - } - - var cachedRegion; - if (codes[code] && body.length === 0) { - if (bucket && !region) { - cachedRegion = bucketRegionCache[bucket] || null; - if (cachedRegion !== req.httpRequest.region) { - region = cachedRegion; - } - } - resp.error = AWS.util.error(new Error(), { - code: codes[code], - message: null, - region: region - }); - } else { - var data = new AWS.XML.Parser().parse(body.toString()); - - if (data.Region && !region) { - region = data.Region; - if (bucket && region !== bucketRegionCache[bucket]) { - bucketRegionCache[bucket] = region; - } - } else if (bucket && !region && !data.Region) { - cachedRegion = bucketRegionCache[bucket] || null; - if (cachedRegion !== req.httpRequest.region) { - region = cachedRegion; - } - } - - resp.error = AWS.util.error(new Error(), { - code: data.Code || code, - message: data.Message || null, - region: region - }); - } - req.service.extractRequestIds(resp); - }, - - /** - * If region was not obtained synchronously, then send async request - * to get bucket region for errors resulting from wrong region. - * - * @api private - */ - requestBucketRegion: function requestBucketRegion(resp, done) { - var error = resp.error; - var req = resp.request; - var bucket = req.params.Bucket || null; - - if (!error || !bucket || error.region || req.operation === 'listObjects' || - (AWS.util.isNode() && req.operation === 'headBucket') || - (error.statusCode === 400 && req.operation !== 'headObject') || - regionRedirectErrorCodes.indexOf(error.code) === -1) { - return done(); - } - var reqOperation = AWS.util.isNode() ? 'headBucket' : 'listObjects'; - var reqParams = {Bucket: bucket}; - if (reqOperation === 'listObjects') reqParams.MaxKeys = 0; - var regionReq = req.service[reqOperation](reqParams); - regionReq._requestRegionForBucket = bucket; - regionReq.send(function() { - var region = req.service.bucketRegionCache[bucket] || null; - error.region = region; - done(); - }); - }, - - /** - * For browser only. If NetworkingError received, will attempt to obtain - * the bucket region. - * - * @api private - */ - reqRegionForNetworkingError: function reqRegionForNetworkingError(resp, done) { - if (!AWS.util.isBrowser()) { - return done(); - } - var error = resp.error; - var request = resp.request; - var bucket = request.params.Bucket; - if (!error || error.code !== 'NetworkingError' || !bucket || - request.httpRequest.region === 'us-east-1') { - return done(); - } - var service = request.service; - var bucketRegionCache = service.bucketRegionCache; - var cachedRegion = bucketRegionCache[bucket] || null; - - if (cachedRegion && cachedRegion !== request.httpRequest.region) { - service.updateReqBucketRegion(request, cachedRegion); - done(); - } else if (!s3util.dnsCompatibleBucketName(bucket)) { - service.updateReqBucketRegion(request, 'us-east-1'); - if (bucketRegionCache[bucket] !== 'us-east-1') { - bucketRegionCache[bucket] = 'us-east-1'; - } - done(); - } else if (request.httpRequest.virtualHostedBucket) { - var getRegionReq = service.listObjects({Bucket: bucket, MaxKeys: 0}); - service.updateReqBucketRegion(getRegionReq, 'us-east-1'); - getRegionReq._requestRegionForBucket = bucket; - - getRegionReq.send(function() { - var region = service.bucketRegionCache[bucket] || null; - if (region && region !== request.httpRequest.region) { - service.updateReqBucketRegion(request, region); - } - done(); - }); - } else { - // DNS-compatible path-style - // (s3ForcePathStyle or bucket name with dot over https) - // Cannot obtain region information for this case - done(); - } - }, - - /** - * Cache for bucket region. - * - * @api private - */ - bucketRegionCache: {}, - - /** - * Clears bucket region cache. - * - * @api private - */ - clearBucketRegionCache: function(buckets) { - var bucketRegionCache = this.bucketRegionCache; - if (!buckets) { - buckets = Object.keys(bucketRegionCache); - } else if (typeof buckets === 'string') { - buckets = [buckets]; - } - for (var i = 0; i < buckets.length; i++) { - delete bucketRegionCache[buckets[i]]; - } - return bucketRegionCache; - }, - - /** - * Corrects request region if bucket's cached region is different - * - * @api private - */ - correctBucketRegionFromCache: function correctBucketRegionFromCache(req) { - var bucket = req.params.Bucket || null; - if (bucket) { - var service = req.service; - var requestRegion = req.httpRequest.region; - var cachedRegion = service.bucketRegionCache[bucket]; - if (cachedRegion && cachedRegion !== requestRegion) { - service.updateReqBucketRegion(req, cachedRegion); - } - } - }, - - /** - * Extracts S3 specific request ids from the http response. - * - * @api private - */ - extractRequestIds: function extractRequestIds(resp) { - var extendedRequestId = resp.httpResponse.headers ? resp.httpResponse.headers['x-amz-id-2'] : null; - var cfId = resp.httpResponse.headers ? resp.httpResponse.headers['x-amz-cf-id'] : null; - resp.extendedRequestId = extendedRequestId; - resp.cfId = cfId; - - if (resp.error) { - resp.error.requestId = resp.requestId || null; - resp.error.extendedRequestId = extendedRequestId; - resp.error.cfId = cfId; - } - }, - - /** - * Get a pre-signed URL for a given operation name. - * - * @note You must ensure that you have static or previously resolved - * credentials if you call this method synchronously (with no callback), - * otherwise it may not properly sign the request. If you cannot guarantee - * this (you are using an asynchronous credential provider, i.e., EC2 - * IAM roles), you should always call this method with an asynchronous - * callback. - * @note Not all operation parameters are supported when using pre-signed - * URLs. Certain parameters, such as `SSECustomerKey`, `ACL`, `Expires`, - * `ContentLength`, or `Tagging` must be provided as headers when sending a - * request. If you are using pre-signed URLs to upload from a browser and - * need to use these fields, see {createPresignedPost}. - * @note The default signer allows altering the request by adding corresponding - * headers to set some parameters (e.g. Range) and these added parameters - * won't be signed. You must use signatureVersion v4 to to include these - * parameters in the signed portion of the URL and enforce exact matching - * between headers and signed params in the URL. - * @note This operation cannot be used with a promise. See note above regarding - * asynchronous credentials and use with a callback. - * @param operation [String] the name of the operation to call - * @param params [map] parameters to pass to the operation. See the given - * operation for the expected operation parameters. In addition, you can - * also pass the "Expires" parameter to inform S3 how long the URL should - * work for. - * @option params Expires [Integer] (900) the number of seconds to expire - * the pre-signed URL operation in. Defaults to 15 minutes. - * @param callback [Function] if a callback is provided, this function will - * pass the URL as the second parameter (after the error parameter) to - * the callback function. - * @return [String] if called synchronously (with no callback), returns the - * signed URL. - * @return [null] nothing is returned if a callback is provided. - * @example Pre-signing a getObject operation (synchronously) - * var params = {Bucket: 'bucket', Key: 'key'}; - * var url = s3.getSignedUrl('getObject', params); - * console.log('The URL is', url); - * @example Pre-signing a putObject (asynchronously) - * var params = {Bucket: 'bucket', Key: 'key'}; - * s3.getSignedUrl('putObject', params, function (err, url) { - * console.log('The URL is', url); - * }); - * @example Pre-signing a putObject operation with a specific payload - * var params = {Bucket: 'bucket', Key: 'key', Body: 'body'}; - * var url = s3.getSignedUrl('putObject', params); - * console.log('The URL is', url); - * @example Passing in a 1-minute expiry time for a pre-signed URL - * var params = {Bucket: 'bucket', Key: 'key', Expires: 60}; - * var url = s3.getSignedUrl('getObject', params); - * console.log('The URL is', url); // expires in 60 seconds - */ - getSignedUrl: function getSignedUrl(operation, params, callback) { - params = AWS.util.copy(params || {}); - var expires = params.Expires || 900; - - if (typeof expires !== 'number') { - throw AWS.util.error(new Error(), - { code: 'InvalidParameterException', message: 'The expiration must be a number, received ' + typeof expires }); - } - - delete params.Expires; // we can't validate this - var request = this.makeRequest(operation, params); - - if (callback) { - AWS.util.defer(function() { - request.presign(expires, callback); - }); - } else { - return request.presign(expires, callback); - } - }, - - /** - * @!method getSignedUrlPromise() - * Returns a 'thenable' promise that will be resolved with a pre-signed URL - * for a given operation name. - * - * Two callbacks can be provided to the `then` method on the returned promise. - * The first callback will be called if the promise is fulfilled, and the second - * callback will be called if the promise is rejected. - * @note Not all operation parameters are supported when using pre-signed - * URLs. Certain parameters, such as `SSECustomerKey`, `ACL`, `Expires`, - * `ContentLength`, or `Tagging` must be provided as headers when sending a - * request. If you are using pre-signed URLs to upload from a browser and - * need to use these fields, see {createPresignedPost}. - * @param operation [String] the name of the operation to call - * @param params [map] parameters to pass to the operation. See the given - * operation for the expected operation parameters. In addition, you can - * also pass the "Expires" parameter to inform S3 how long the URL should - * work for. - * @option params Expires [Integer] (900) the number of seconds to expire - * the pre-signed URL operation in. Defaults to 15 minutes. - * @callback fulfilledCallback function(url) - * Called if the promise is fulfilled. - * @param url [String] the signed url - * @callback rejectedCallback function(err) - * Called if the promise is rejected. - * @param err [Error] if an error occurred, this value will be filled - * @return [Promise] A promise that represents the state of the `refresh` call. - * @example Pre-signing a getObject operation - * var params = {Bucket: 'bucket', Key: 'key'}; - * var promise = s3.getSignedUrlPromise('getObject', params); - * promise.then(function(url) { - * console.log('The URL is', url); - * }, function(err) { ... }); - * @example Pre-signing a putObject operation with a specific payload - * var params = {Bucket: 'bucket', Key: 'key', Body: 'body'}; - * var promise = s3.getSignedUrlPromise('putObject', params); - * promise.then(function(url) { - * console.log('The URL is', url); - * }, function(err) { ... }); - * @example Passing in a 1-minute expiry time for a pre-signed URL - * var params = {Bucket: 'bucket', Key: 'key', Expires: 60}; - * var promise = s3.getSignedUrlPromise('getObject', params); - * promise.then(function(url) { - * console.log('The URL is', url); - * }, function(err) { ... }); - */ - - /** - * Get a pre-signed POST policy to support uploading to S3 directly from an - * HTML form. - * - * @param params [map] - * @option params Bucket [String] The bucket to which the post should be - * uploaded - * @option params Expires [Integer] (3600) The number of seconds for which - * the presigned policy should be valid. - * @option params Conditions [Array] An array of conditions that must be met - * for the presigned policy to allow the - * upload. This can include required tags, - * the accepted range for content lengths, - * etc. - * @see http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-HTTPPOSTConstructPolicy.html - * @option params Fields [map] Fields to include in the form. All - * values passed in as fields will be - * signed as exact match conditions. - * @param callback [Function] - * - * @note All fields passed in when creating presigned post data will be signed - * as exact match conditions. Any fields that will be interpolated by S3 - * must be added to the fields hash after signing, and an appropriate - * condition for such fields must be explicitly added to the Conditions - * array passed to this function before signing. - * - * @example Presiging post data with a known key - * var params = { - * Bucket: 'bucket', - * Fields: { - * key: 'key' - * } - * }; - * s3.createPresignedPost(params, function(err, data) { - * if (err) { - * console.error('Presigning post data encountered an error', err); - * } else { - * console.log('The post data is', data); - * } - * }); - * - * @example Presigning post data with an interpolated key - * var params = { - * Bucket: 'bucket', - * Conditions: [ - * ['starts-with', '$key', 'path/to/uploads/'] - * ] - * }; - * s3.createPresignedPost(params, function(err, data) { - * if (err) { - * console.error('Presigning post data encountered an error', err); - * } else { - * data.Fields.key = 'path/to/uploads/${filename}'; - * console.log('The post data is', data); - * } - * }); - * - * @note You must ensure that you have static or previously resolved - * credentials if you call this method synchronously (with no callback), - * otherwise it may not properly sign the request. If you cannot guarantee - * this (you are using an asynchronous credential provider, i.e., EC2 - * IAM roles), you should always call this method with an asynchronous - * callback. - * - * @return [map] If called synchronously (with no callback), returns a hash - * with the url to set as the form action and a hash of fields - * to include in the form. - * @return [null] Nothing is returned if a callback is provided. - * - * @callback callback function (err, data) - * @param err [Error] the error object returned from the policy signer - * @param data [map] The data necessary to construct an HTML form - * @param data.url [String] The URL to use as the action of the form - * @param data.fields [map] A hash of fields that must be included in the - * form for the upload to succeed. This hash will - * include the signed POST policy, your access key - * ID and security token (if present), etc. These - * may be safely included as input elements of type - * 'hidden.' - */ - createPresignedPost: function createPresignedPost(params, callback) { - if (typeof params === 'function' && callback === undefined) { - callback = params; - params = null; - } - - params = AWS.util.copy(params || {}); - var boundParams = this.config.params || {}; - var bucket = params.Bucket || boundParams.Bucket, - self = this, - config = this.config, - endpoint = AWS.util.copy(this.endpoint); - if (!config.s3BucketEndpoint) { - endpoint.pathname = '/' + bucket; - } - - function finalizePost() { - return { - url: AWS.util.urlFormat(endpoint), - fields: self.preparePostFields( - config.credentials, - config.region, - bucket, - params.Fields, - params.Conditions, - params.Expires - ) - }; - } - - if (callback) { - config.getCredentials(function (err) { - if (err) { - callback(err); - } else { - try { - callback(null, finalizePost()); - } catch (err) { - callback(err); - } - } - }); - } else { - return finalizePost(); - } - }, - - /** - * @api private - */ - preparePostFields: function preparePostFields( - credentials, - region, - bucket, - fields, - conditions, - expiresInSeconds - ) { - var now = this.getSkewCorrectedDate(); - if (!credentials || !region || !bucket) { - throw new Error('Unable to create a POST object policy without a bucket,' - + ' region, and credentials'); - } - fields = AWS.util.copy(fields || {}); - conditions = (conditions || []).slice(0); - expiresInSeconds = expiresInSeconds || 3600; - - var signingDate = AWS.util.date.iso8601(now).replace(/[:\-]|\.\d{3}/g, ''); - var shortDate = signingDate.substr(0, 8); - var scope = v4Credentials.createScope(shortDate, region, 's3'); - var credential = credentials.accessKeyId + '/' + scope; - - fields['bucket'] = bucket; - fields['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256'; - fields['X-Amz-Credential'] = credential; - fields['X-Amz-Date'] = signingDate; - if (credentials.sessionToken) { - fields['X-Amz-Security-Token'] = credentials.sessionToken; - } - for (var field in fields) { - if (fields.hasOwnProperty(field)) { - var condition = {}; - condition[field] = fields[field]; - conditions.push(condition); - } - } - - fields.Policy = this.preparePostPolicy( - new Date(now.valueOf() + expiresInSeconds * 1000), - conditions - ); - fields['X-Amz-Signature'] = AWS.util.crypto.hmac( - v4Credentials.getSigningKey(credentials, shortDate, region, 's3', true), - fields.Policy, - 'hex' - ); - - return fields; - }, - - /** - * @api private - */ - preparePostPolicy: function preparePostPolicy(expiration, conditions) { - return AWS.util.base64.encode(JSON.stringify({ - expiration: AWS.util.date.iso8601(expiration), - conditions: conditions - })); - }, - - /** - * @api private - */ - prepareSignedUrl: function prepareSignedUrl(request) { - request.addListener('validate', request.service.noPresignedContentLength); - request.removeListener('build', request.service.addContentType); - if (!request.params.Body) { - // no Content-MD5/SHA-256 if body is not provided - request.removeListener('build', request.service.computeContentMd5); - } else { - request.addListener('afterBuild', AWS.EventListeners.Core.COMPUTE_SHA256); - } - }, - - /** - * @api private - * @param request - */ - disableBodySigning: function disableBodySigning(request) { - var headers = request.httpRequest.headers; - // Add the header to anything that isn't a presigned url, unless that presigned url had a body defined - if (!Object.prototype.hasOwnProperty.call(headers, 'presigned-expires')) { - headers['X-Amz-Content-Sha256'] = 'UNSIGNED-PAYLOAD'; - } - }, - - /** - * @api private - */ - noPresignedContentLength: function noPresignedContentLength(request) { - if (request.params.ContentLength !== undefined) { - throw AWS.util.error(new Error(), {code: 'UnexpectedParameter', - message: 'ContentLength is not supported in pre-signed URLs.'}); - } - }, - - createBucket: function createBucket(params, callback) { - // When creating a bucket *outside* the classic region, the location - // constraint must be set for the bucket and it must match the endpoint. - // This chunk of code will set the location constraint param based - // on the region (when possible), but it will not override a passed-in - // location constraint. - if (typeof params === 'function' || !params) { - callback = callback || params; - params = {}; - } - var hostname = this.endpoint.hostname; - // copy params so that appending keys does not unintentioinallly - // mutate params object argument passed in by user - var copiedParams = AWS.util.copy(params); - - if (hostname !== this.api.globalEndpoint && !params.CreateBucketConfiguration) { - copiedParams.CreateBucketConfiguration = { LocationConstraint: this.config.region }; - } - return this.makeRequest('createBucket', copiedParams, callback); - }, - - writeGetObjectResponse: function writeGetObjectResponse(params, callback) { - - var request = this.makeRequest('writeGetObjectResponse', AWS.util.copy(params), callback); - var hostname = this.endpoint.hostname; - if (hostname.indexOf(this.config.region) !== -1) { - // hostname specifies a region already - hostname = hostname.replace('s3.', OBJECT_LAMBDA_SERVICE + '.'); - } else { - // Hostname doesn't have a region. - // Object Lambda requires an explicit region. - hostname = hostname.replace('s3.', OBJECT_LAMBDA_SERVICE + '.' + this.config.region + '.'); - } - - request.httpRequest.endpoint = new AWS.Endpoint(hostname, this.config); - return request; - }, - - /** - * @see AWS.S3.ManagedUpload - * @overload upload(params = {}, [options], [callback]) - * Uploads an arbitrarily sized buffer, blob, or stream, using intelligent - * concurrent handling of parts if the payload is large enough. You can - * configure the concurrent queue size by setting `options`. Note that this - * is the only operation for which the SDK can retry requests with stream - * bodies. - * - * @param (see AWS.S3.putObject) - * @option (see AWS.S3.ManagedUpload.constructor) - * @return [AWS.S3.ManagedUpload] the managed upload object that can call - * `send()` or track progress. - * @example Uploading a stream object - * var params = {Bucket: 'bucket', Key: 'key', Body: stream}; - * s3.upload(params, function(err, data) { - * console.log(err, data); - * }); - * @example Uploading a stream with concurrency of 1 and partSize of 10mb - * var params = {Bucket: 'bucket', Key: 'key', Body: stream}; - * var options = {partSize: 10 * 1024 * 1024, queueSize: 1}; - * s3.upload(params, options, function(err, data) { - * console.log(err, data); - * }); - * @callback callback function(err, data) - * @param err [Error] an error or null if no error occurred. - * @param data [map] The response data from the successful upload: - * @param data.Location [String] the URL of the uploaded object - * @param data.ETag [String] the ETag of the uploaded object - * @param data.Bucket [String] the bucket to which the object was uploaded - * @param data.Key [String] the key to which the object was uploaded - */ - upload: function upload(params, options, callback) { - if (typeof options === 'function' && callback === undefined) { - callback = options; - options = null; - } - - options = options || {}; - options = AWS.util.merge(options || {}, {service: this, params: params}); - - var uploader = new AWS.S3.ManagedUpload(options); - if (typeof callback === 'function') uploader.send(callback); - return uploader; - } -}); - -/** - * @api private - */ -AWS.S3.addPromisesToClass = function addPromisesToClass(PromiseDependency) { - this.prototype.getSignedUrlPromise = AWS.util.promisifyMethod('getSignedUrl', PromiseDependency); -}; - -/** - * @api private - */ -AWS.S3.deletePromisesFromClass = function deletePromisesFromClass() { - delete this.prototype.getSignedUrlPromise; -}; - -AWS.util.addPromises(AWS.S3); - - -/***/ }), - -/***/ 71207: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var s3util = __nccwpck_require__(35895); -var regionUtil = __nccwpck_require__(18262); - -AWS.util.update(AWS.S3Control.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - request.addListener('extractError', this.extractHostId); - request.addListener('extractData', this.extractHostId); - request.addListener('validate', this.validateAccountId); - - var isArnInBucket = s3util.isArnInParam(request, 'Bucket'); - var isArnInName = s3util.isArnInParam(request, 'Name'); - - if (isArnInBucket) { - request._parsedArn = AWS.util.ARN.parse(request.params['Bucket']); - request.addListener('validate', this.validateOutpostsBucketArn); - request.addListener('validate', s3util.validateOutpostsArn); - request.addListener('afterBuild', this.addOutpostIdHeader); - } else if (isArnInName) { - request._parsedArn = AWS.util.ARN.parse(request.params['Name']); - request.addListener('validate', s3util.validateOutpostsAccessPointArn); - request.addListener('validate', s3util.validateOutpostsArn); - request.addListener('afterBuild', this.addOutpostIdHeader); - } - - if (isArnInBucket || isArnInName) { - request.addListener('validate', this.validateArnRegion); - request.addListener('validate', this.validateArnAccountWithParams, true); - request.addListener('validate', s3util.validateArnAccount); - request.addListener('validate', s3util.validateArnService); - request.addListener('build', this.populateParamFromArn, true); - request.addListener('build', this.populateUriFromArn); - request.addListener('build', s3util.validatePopulateUriFromArn); - } - - if (request.params.OutpostId && - (request.operation === 'createBucket' || - request.operation === 'listRegionalBuckets')) { - request.addListener('build', this.populateEndpointForOutpostId); - } - }, - - /** - * Adds outpostId header - */ - addOutpostIdHeader: function addOutpostIdHeader(req) { - req.httpRequest.headers['x-amz-outpost-id'] = req._parsedArn.outpostId; - }, - - /** - * Validate Outposts ARN supplied in Bucket parameter is a valid bucket name - */ - validateOutpostsBucketArn: function validateOutpostsBucketArn(req) { - var parsedArn = req._parsedArn; - - //can be ':' or '/' - var delimiter = parsedArn.resource['outpost'.length]; - - if (parsedArn.resource.split(delimiter).length !== 4) { - throw AWS.util.error(new Error(), { - code: 'InvalidARN', - message: 'Bucket ARN should have two resources outpost/{outpostId}/bucket/{accesspointName}' - }); - } - - var bucket = parsedArn.resource.split(delimiter)[3]; - if (!s3util.dnsCompatibleBucketName(bucket) || bucket.match(/\./)) { - throw AWS.util.error(new Error(), { - code: 'InvalidARN', - message: 'Bucket ARN is not DNS compatible. Got ' + bucket - }); - } - - //set parsed valid bucket - req._parsedArn.bucket = bucket; - }, - - /** - * @api private - */ - populateParamFromArn: function populateParamFromArn(req) { - var parsedArn = req._parsedArn; - if (s3util.isArnInParam(req, 'Bucket')) { - req.params.Bucket = parsedArn.bucket; - } else if (s3util.isArnInParam(req, 'Name')) { - req.params.Name = parsedArn.accessPoint; - } - }, - - /** - * Populate URI according to the ARN - */ - populateUriFromArn: function populateUriFromArn(req) { - var parsedArn = req._parsedArn; - - var endpoint = req.httpRequest.endpoint; - var useArnRegion = req.service.config.s3UseArnRegion; - var useFipsEndpoint = req.service.config.useFipsEndpoint; - - endpoint.hostname = [ - 's3-outposts' + (useFipsEndpoint ? '-fips': ''), - useArnRegion ? parsedArn.region : req.service.config.region, - 'amazonaws.com' - ].join('.'); - endpoint.host = endpoint.hostname; - }, - - /** - * @api private - */ - populateEndpointForOutpostId: function populateEndpointForOutpostId(req) { - var endpoint = req.httpRequest.endpoint; - var useFipsEndpoint = req.service.config.useFipsEndpoint; - endpoint.hostname = [ - 's3-outposts' + (useFipsEndpoint ? '-fips': ''), - req.service.config.region, - 'amazonaws.com' - ].join('.'); - endpoint.host = endpoint.hostname; - }, - - /** - * @api private - */ - extractHostId: function(response) { - var hostId = response.httpResponse.headers ? response.httpResponse.headers['x-amz-id-2'] : null; - response.extendedRequestId = hostId; - if (response.error) { - response.error.extendedRequestId = hostId; - } - }, - - /** - * @api private - */ - validateArnRegion: function validateArnRegion(req) { - s3util.validateArnRegion(req, { allowFipsEndpoint: true }); - }, - - /** - * @api private - */ - validateArnAccountWithParams: function validateArnAccountWithParams(req) { - var params = req.params; - var inputModel = req.service.api.operations[req.operation].input; - if (inputModel.members.AccountId) { - var parsedArn = req._parsedArn; - if (parsedArn.accountId) { - if (params.AccountId) { - if (params.AccountId !== parsedArn.accountId) { - throw AWS.util.error( - new Error(), - {code: 'ValidationError', message: 'AccountId in ARN and request params should be same.'} - ); - } - } else { - // Store accountId from ARN in params - params.AccountId = parsedArn.accountId; - } - } - } - }, - - /** - * @api private - */ - validateAccountId: function(request) { - var params = request.params; - if (!Object.prototype.hasOwnProperty.call(params, 'AccountId')) return; - var accountId = params.AccountId; - //validate type - if (typeof accountId !== 'string') { - throw AWS.util.error( - new Error(), - {code: 'ValidationError', message: 'AccountId must be a string.'} - ); - } - //validate length - if (accountId.length < 1 || accountId.length > 63) { - throw AWS.util.error( - new Error(), - {code: 'ValidationError', message: 'AccountId length should be between 1 to 63 characters, inclusive.'} - ); - } - //validate pattern - var hostPattern = /^[a-zA-Z0-9]{1}$|^[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]$/; - if (!hostPattern.test(accountId)) { - throw AWS.util.error(new Error(), - {code: 'ValidationError', message: 'AccountId should be hostname compatible. AccountId: ' + accountId}); - } - }, - - /** - * @api private - */ - getSigningName: function getSigningName(req) { - var _super = AWS.Service.prototype.getSigningName; - if (req && req._parsedArn && req._parsedArn.service) { - return req._parsedArn.service; - } else if (req.params.OutpostId && - (req.operation === 'createBucket' || - req.operation === 'listRegionalBuckets')) { - return 's3-outposts'; - } else { - return _super.call(this, req); - } - }, -}); - - -/***/ }), - -/***/ 35895: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var regionUtil = __nccwpck_require__(18262); - -var s3util = { - /** - * @api private - */ - isArnInParam: function isArnInParam(req, paramName) { - var inputShape = (req.service.api.operations[req.operation] || {}).input || {}; - var inputMembers = inputShape.members || {}; - if (!req.params[paramName] || !inputMembers[paramName]) return false; - return AWS.util.ARN.validate(req.params[paramName]); - }, - - /** - * Validate service component from ARN supplied in Bucket parameter - */ - validateArnService: function validateArnService(req) { - var parsedArn = req._parsedArn; - - if (parsedArn.service !== 's3' - && parsedArn.service !== 's3-outposts' - && parsedArn.service !== 's3-object-lambda') { - throw AWS.util.error(new Error(), { - code: 'InvalidARN', - message: 'expect \'s3\' or \'s3-outposts\' or \'s3-object-lambda\' in ARN service component' - }); - } - }, - - /** - * Validate account ID from ARN supplied in Bucket parameter is a valid account - */ - validateArnAccount: function validateArnAccount(req) { - var parsedArn = req._parsedArn; - - if (!/[0-9]{12}/.exec(parsedArn.accountId)) { - throw AWS.util.error(new Error(), { - code: 'InvalidARN', - message: 'ARN accountID does not match regex "[0-9]{12}"' - }); - } - }, - - /** - * Validate ARN supplied in Bucket parameter is a valid access point ARN - */ - validateS3AccessPointArn: function validateS3AccessPointArn(req) { - var parsedArn = req._parsedArn; - - //can be ':' or '/' - var delimiter = parsedArn.resource['accesspoint'.length]; - - if (parsedArn.resource.split(delimiter).length !== 2) { - throw AWS.util.error(new Error(), { - code: 'InvalidARN', - message: 'Access Point ARN should have one resource accesspoint/{accesspointName}' - }); - } - - var accessPoint = parsedArn.resource.split(delimiter)[1]; - var accessPointPrefix = accessPoint + '-' + parsedArn.accountId; - if (!s3util.dnsCompatibleBucketName(accessPointPrefix) || accessPointPrefix.match(/\./)) { - throw AWS.util.error(new Error(), { - code: 'InvalidARN', - message: 'Access point resource in ARN is not DNS compatible. Got ' + accessPoint - }); - } - - //set parsed valid access point - req._parsedArn.accessPoint = accessPoint; - }, - - /** - * Validate Outposts ARN supplied in Bucket parameter is a valid outposts ARN - */ - validateOutpostsArn: function validateOutpostsArn(req) { - var parsedArn = req._parsedArn; - - if ( - parsedArn.resource.indexOf('outpost:') !== 0 && - parsedArn.resource.indexOf('outpost/') !== 0 - ) { - throw AWS.util.error(new Error(), { - code: 'InvalidARN', - message: 'ARN resource should begin with \'outpost/\'' - }); - } - - //can be ':' or '/' - var delimiter = parsedArn.resource['outpost'.length]; - var outpostId = parsedArn.resource.split(delimiter)[1]; - var dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/); - if (!dnsHostRegex.test(outpostId)) { - throw AWS.util.error(new Error(), { - code: 'InvalidARN', - message: 'Outpost resource in ARN is not DNS compatible. Got ' + outpostId - }); - } - req._parsedArn.outpostId = outpostId; - }, - - /** - * Validate Outposts ARN supplied in Bucket parameter is a valid outposts ARN - */ - validateOutpostsAccessPointArn: function validateOutpostsAccessPointArn(req) { - var parsedArn = req._parsedArn; - - //can be ':' or '/' - var delimiter = parsedArn.resource['outpost'.length]; - - if (parsedArn.resource.split(delimiter).length !== 4) { - throw AWS.util.error(new Error(), { - code: 'InvalidARN', - message: 'Outposts ARN should have two resources outpost/{outpostId}/accesspoint/{accesspointName}' - }); - } - - var accessPoint = parsedArn.resource.split(delimiter)[3]; - var accessPointPrefix = accessPoint + '-' + parsedArn.accountId; - if (!s3util.dnsCompatibleBucketName(accessPointPrefix) || accessPointPrefix.match(/\./)) { - throw AWS.util.error(new Error(), { - code: 'InvalidARN', - message: 'Access point resource in ARN is not DNS compatible. Got ' + accessPoint - }); - } - - //set parsed valid access point - req._parsedArn.accessPoint = accessPoint; - }, - - /** - * Validate region field in ARN supplied in Bucket parameter is a valid region - */ - validateArnRegion: function validateArnRegion(req, options) { - if (options === undefined) { - options = {}; - } - - var useArnRegion = s3util.loadUseArnRegionConfig(req); - var regionFromArn = req._parsedArn.region; - var clientRegion = req.service.config.region; - var useFipsEndpoint = req.service.config.useFipsEndpoint; - var allowFipsEndpoint = options.allowFipsEndpoint || false; - - if (!regionFromArn) { - throw AWS.util.error(new Error(), { - code: 'InvalidARN', - message: 'ARN region is empty' - }); - } - - if (useFipsEndpoint && !allowFipsEndpoint) { - throw AWS.util.error(new Error(), { - code: 'InvalidConfiguration', - message: 'ARN endpoint is not compatible with FIPS region' - }); - } - - if (regionFromArn.indexOf('fips') >= 0) { - throw AWS.util.error(new Error(), { - code: 'InvalidConfiguration', - message: 'FIPS region not allowed in ARN' - }); - } - - if (!useArnRegion && regionFromArn !== clientRegion) { - throw AWS.util.error(new Error(), { - code: 'InvalidConfiguration', - message: 'Configured region conflicts with access point region' - }); - } else if ( - useArnRegion && - regionUtil.getEndpointSuffix(regionFromArn) !== regionUtil.getEndpointSuffix(clientRegion) - ) { - throw AWS.util.error(new Error(), { - code: 'InvalidConfiguration', - message: 'Configured region and access point region not in same partition' - }); - } - - if (req.service.config.useAccelerateEndpoint) { - throw AWS.util.error(new Error(), { - code: 'InvalidConfiguration', - message: 'useAccelerateEndpoint config is not supported with access point ARN' - }); - } - - if (req._parsedArn.service === 's3-outposts' && req.service.config.useDualstackEndpoint) { - throw AWS.util.error(new Error(), { - code: 'InvalidConfiguration', - message: 'Dualstack is not supported with outposts access point ARN' - }); - } - }, - - loadUseArnRegionConfig: function loadUseArnRegionConfig(req) { - var envName = 'AWS_S3_USE_ARN_REGION'; - var configName = 's3_use_arn_region'; - var useArnRegion = true; - var originalConfig = req.service._originalConfig || {}; - if (req.service.config.s3UseArnRegion !== undefined) { - return req.service.config.s3UseArnRegion; - } else if (originalConfig.s3UseArnRegion !== undefined) { - useArnRegion = originalConfig.s3UseArnRegion === true; - } else if (AWS.util.isNode()) { - //load from environmental variable AWS_USE_ARN_REGION - if (process.env[envName]) { - var value = process.env[envName].trim().toLowerCase(); - if (['false', 'true'].indexOf(value) < 0) { - throw AWS.util.error(new Error(), { - code: 'InvalidConfiguration', - message: envName + ' only accepts true or false. Got ' + process.env[envName], - retryable: false - }); - } - useArnRegion = value === 'true'; - } else { //load from shared config property use_arn_region - var profiles = {}; - var profile = {}; - try { - profiles = AWS.util.getProfilesFromSharedConfig(AWS.util.iniLoader); - profile = profiles[process.env.AWS_PROFILE || AWS.util.defaultProfile]; - } catch (e) {} - if (profile[configName]) { - if (['false', 'true'].indexOf(profile[configName].trim().toLowerCase()) < 0) { - throw AWS.util.error(new Error(), { - code: 'InvalidConfiguration', - message: configName + ' only accepts true or false. Got ' + profile[configName], - retryable: false - }); - } - useArnRegion = profile[configName].trim().toLowerCase() === 'true'; - } - } - } - req.service.config.s3UseArnRegion = useArnRegion; - return useArnRegion; - }, - - /** - * Validations before URI can be populated - */ - validatePopulateUriFromArn: function validatePopulateUriFromArn(req) { - if (req.service._originalConfig && req.service._originalConfig.endpoint) { - throw AWS.util.error(new Error(), { - code: 'InvalidConfiguration', - message: 'Custom endpoint is not compatible with access point ARN' - }); - } - - if (req.service.config.s3ForcePathStyle) { - throw AWS.util.error(new Error(), { - code: 'InvalidConfiguration', - message: 'Cannot construct path-style endpoint with access point' - }); - } - }, - - /** - * Returns true if the bucket name is DNS compatible. Buckets created - * outside of the classic region MUST be DNS compatible. - * - * @api private - */ - dnsCompatibleBucketName: function dnsCompatibleBucketName(bucketName) { - var b = bucketName; - var domain = new RegExp(/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/); - var ipAddress = new RegExp(/(\d+\.){3}\d+/); - var dots = new RegExp(/\.\./); - return (b.match(domain) && !b.match(ipAddress) && !b.match(dots)) ? true : false; - }, -}; - -/** - * @api private - */ -module.exports = s3util; - - -/***/ }), - -/***/ 94571: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -AWS.util.update(AWS.SQS.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - request.addListener('build', this.buildEndpoint); - - if (request.service.config.computeChecksums) { - if (request.operation === 'sendMessage') { - request.addListener('extractData', this.verifySendMessageChecksum); - } else if (request.operation === 'sendMessageBatch') { - request.addListener('extractData', this.verifySendMessageBatchChecksum); - } else if (request.operation === 'receiveMessage') { - request.addListener('extractData', this.verifyReceiveMessageChecksum); - } - } - }, - - /** - * @api private - */ - verifySendMessageChecksum: function verifySendMessageChecksum(response) { - if (!response.data) return; - - var md5 = response.data.MD5OfMessageBody; - var body = this.params.MessageBody; - var calculatedMd5 = this.service.calculateChecksum(body); - if (calculatedMd5 !== md5) { - var msg = 'Got "' + response.data.MD5OfMessageBody + - '", expecting "' + calculatedMd5 + '".'; - this.service.throwInvalidChecksumError(response, - [response.data.MessageId], msg); - } - }, - - /** - * @api private - */ - verifySendMessageBatchChecksum: function verifySendMessageBatchChecksum(response) { - if (!response.data) return; - - var service = this.service; - var entries = {}; - var errors = []; - var messageIds = []; - AWS.util.arrayEach(response.data.Successful, function (entry) { - entries[entry.Id] = entry; - }); - AWS.util.arrayEach(this.params.Entries, function (entry) { - if (entries[entry.Id]) { - var md5 = entries[entry.Id].MD5OfMessageBody; - var body = entry.MessageBody; - if (!service.isChecksumValid(md5, body)) { - errors.push(entry.Id); - messageIds.push(entries[entry.Id].MessageId); - } - } - }); - - if (errors.length > 0) { - service.throwInvalidChecksumError(response, messageIds, - 'Invalid messages: ' + errors.join(', ')); - } - }, - - /** - * @api private - */ - verifyReceiveMessageChecksum: function verifyReceiveMessageChecksum(response) { - if (!response.data) return; - - var service = this.service; - var messageIds = []; - AWS.util.arrayEach(response.data.Messages, function(message) { - var md5 = message.MD5OfBody; - var body = message.Body; - if (!service.isChecksumValid(md5, body)) { - messageIds.push(message.MessageId); - } - }); - - if (messageIds.length > 0) { - service.throwInvalidChecksumError(response, messageIds, - 'Invalid messages: ' + messageIds.join(', ')); - } - }, - - /** - * @api private - */ - throwInvalidChecksumError: function throwInvalidChecksumError(response, ids, message) { - response.error = AWS.util.error(new Error(), { - retryable: true, - code: 'InvalidChecksum', - messageIds: ids, - message: response.request.operation + - ' returned an invalid MD5 response. ' + message - }); - }, - - /** - * @api private - */ - isChecksumValid: function isChecksumValid(checksum, data) { - return this.calculateChecksum(data) === checksum; - }, - - /** - * @api private - */ - calculateChecksum: function calculateChecksum(data) { - return AWS.util.crypto.md5(data, 'hex'); - }, - - /** - * @api private - */ - buildEndpoint: function buildEndpoint(request) { - var url = request.httpRequest.params.QueueUrl; - if (url) { - request.httpRequest.endpoint = new AWS.Endpoint(url); - - // signature version 4 requires the region name to be set, - // sqs queue urls contain the region name - var matches = request.httpRequest.endpoint.host.match(/^sqs\.(.+?)\./); - if (matches) request.httpRequest.region = matches[1]; - } - } -}); - - -/***/ }), - -/***/ 91055: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var resolveRegionalEndpointsFlag = __nccwpck_require__(85566); -var ENV_REGIONAL_ENDPOINT_ENABLED = 'AWS_STS_REGIONAL_ENDPOINTS'; -var CONFIG_REGIONAL_ENDPOINT_ENABLED = 'sts_regional_endpoints'; - -AWS.util.update(AWS.STS.prototype, { - /** - * @overload credentialsFrom(data, credentials = null) - * Creates a credentials object from STS response data containing - * credentials information. Useful for quickly setting AWS credentials. - * - * @note This is a low-level utility function. If you want to load temporary - * credentials into your process for subsequent requests to AWS resources, - * you should use {AWS.TemporaryCredentials} instead. - * @param data [map] data retrieved from a call to {getFederatedToken}, - * {getSessionToken}, {assumeRole}, or {assumeRoleWithWebIdentity}. - * @param credentials [AWS.Credentials] an optional credentials object to - * fill instead of creating a new object. Useful when modifying an - * existing credentials object from a refresh call. - * @return [AWS.TemporaryCredentials] the set of temporary credentials - * loaded from a raw STS operation response. - * @example Using credentialsFrom to load global AWS credentials - * var sts = new AWS.STS(); - * sts.getSessionToken(function (err, data) { - * if (err) console.log("Error getting credentials"); - * else { - * AWS.config.credentials = sts.credentialsFrom(data); - * } - * }); - * @see AWS.TemporaryCredentials - */ - credentialsFrom: function credentialsFrom(data, credentials) { - if (!data) return null; - if (!credentials) credentials = new AWS.TemporaryCredentials(); - credentials.expired = false; - credentials.accessKeyId = data.Credentials.AccessKeyId; - credentials.secretAccessKey = data.Credentials.SecretAccessKey; - credentials.sessionToken = data.Credentials.SessionToken; - credentials.expireTime = data.Credentials.Expiration; - return credentials; - }, - - assumeRoleWithWebIdentity: function assumeRoleWithWebIdentity(params, callback) { - return this.makeUnauthenticatedRequest('assumeRoleWithWebIdentity', params, callback); - }, - - assumeRoleWithSAML: function assumeRoleWithSAML(params, callback) { - return this.makeUnauthenticatedRequest('assumeRoleWithSAML', params, callback); - }, - - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - request.addListener('validate', this.optInRegionalEndpoint, true); - }, - - /** - * @api private - */ - optInRegionalEndpoint: function optInRegionalEndpoint(req) { - var service = req.service; - var config = service.config; - config.stsRegionalEndpoints = resolveRegionalEndpointsFlag(service._originalConfig, { - env: ENV_REGIONAL_ENDPOINT_ENABLED, - sharedConfig: CONFIG_REGIONAL_ENDPOINT_ENABLED, - clientConfig: 'stsRegionalEndpoints' - }); - if ( - config.stsRegionalEndpoints === 'regional' && - service.isGlobalEndpoint - ) { - //client will throw if region is not supplied; request will be signed with specified region - if (!config.region) { - throw AWS.util.error(new Error(), - {code: 'ConfigError', message: 'Missing region in config'}); - } - var insertPoint = config.endpoint.indexOf('.amazonaws.com'); - var regionalEndpoint = config.endpoint.substring(0, insertPoint) + - '.' + config.region + config.endpoint.substring(insertPoint); - req.httpRequest.updateEndpoint(regionalEndpoint); - req.httpRequest.region = config.region; - } - } - -}); - - -/***/ }), - -/***/ 31987: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -AWS.util.hideProperties(AWS, ['SimpleWorkflow']); - -/** - * @constant - * @readonly - * Backwards compatibility for access to the {AWS.SWF} service class. - */ -AWS.SimpleWorkflow = AWS.SWF; - - -/***/ }), - -/***/ 29697: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var IniLoader = __nccwpck_require__(95417).IniLoader; -/** - * Singleton object to load specified config/credentials files. - * It will cache all the files ever loaded; - */ -module.exports.b = new IniLoader(); - - -/***/ }), - -/***/ 95417: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var os = __nccwpck_require__(12087); -var path = __nccwpck_require__(85622); - -function parseFile(filename, isConfig) { - var content = AWS.util.ini.parse(AWS.util.readFileSync(filename)); - var tmpContent = {}; - Object.keys(content).forEach(function(profileName) { - var profileContent = content[profileName]; - profileName = isConfig ? profileName.replace(/^profile\s/, '') : profileName; - Object.defineProperty(tmpContent, profileName, { - value: profileContent, - enumerable: true - }); - }); - return tmpContent; -} - -/** - * Ini file loader class the same as that used in the SDK. It loads and - * parses config and credentials files in .ini format and cache the content - * to assure files are only read once. - * Note that calling operations on the instance instantiated from this class - * won't affect the behavior of SDK since SDK uses an internal singleton of - * this class. - * @!macro nobrowser - */ -AWS.IniLoader = AWS.util.inherit({ - constructor: function IniLoader() { - this.resolvedProfiles = {}; - }, - - /** Remove all cached files. Used after config files are updated. */ - clearCachedFiles: function clearCachedFiles() { - this.resolvedProfiles = {}; - }, - -/** - * Load configurations from config/credentials files and cache them - * for later use. If no file is specified it will try to load default - * files. - * @param options [map] information describing the file - * @option options filename [String] ('~/.aws/credentials' or defined by - * AWS_SHARED_CREDENTIALS_FILE process env var or '~/.aws/config' if - * isConfig is set to true) - * path to the file to be read. - * @option options isConfig [Boolean] (false) True to read config file. - * @return [map] object containing contents from file in key-value - * pairs. - */ - loadFrom: function loadFrom(options) { - options = options || {}; - var isConfig = options.isConfig === true; - var filename = options.filename || this.getDefaultFilePath(isConfig); - if (!this.resolvedProfiles[filename]) { - var fileContent = this.parseFile(filename, isConfig); - Object.defineProperty(this.resolvedProfiles, filename, { value: fileContent }); - } - return this.resolvedProfiles[filename]; - }, - - /** - * @api private - */ - parseFile: parseFile, - - /** - * @api private - */ - getDefaultFilePath: function getDefaultFilePath(isConfig) { - return path.join( - this.getHomeDir(), - '.aws', - isConfig ? 'config' : 'credentials' - ); - }, - - /** - * @api private - */ - getHomeDir: function getHomeDir() { - var env = process.env; - var home = env.HOME || - env.USERPROFILE || - (env.HOMEPATH ? ((env.HOMEDRIVE || 'C:/') + env.HOMEPATH) : null); - - if (home) { - return home; - } - - if (typeof os.homedir === 'function') { - return os.homedir(); - } - - throw AWS.util.error( - new Error('Cannot load credentials, HOME path not set') - ); - } -}); - -var IniLoader = AWS.IniLoader; - -module.exports = { - IniLoader: IniLoader, - parseFile: parseFile, -}; - - -/***/ }), - -/***/ 60328: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var inherit = AWS.util.inherit; - -/** - * @api private - */ -var expiresHeader = 'presigned-expires'; - -/** - * @api private - */ -function signedUrlBuilder(request) { - var expires = request.httpRequest.headers[expiresHeader]; - var signerClass = request.service.getSignerClass(request); - - delete request.httpRequest.headers['User-Agent']; - delete request.httpRequest.headers['X-Amz-User-Agent']; - - if (signerClass === AWS.Signers.V4) { - if (expires > 604800) { // one week expiry is invalid - var message = 'Presigning does not support expiry time greater ' + - 'than a week with SigV4 signing.'; - throw AWS.util.error(new Error(), { - code: 'InvalidExpiryTime', message: message, retryable: false - }); - } - request.httpRequest.headers[expiresHeader] = expires; - } else if (signerClass === AWS.Signers.S3) { - var now = request.service ? request.service.getSkewCorrectedDate() : AWS.util.date.getDate(); - request.httpRequest.headers[expiresHeader] = parseInt( - AWS.util.date.unixTimestamp(now) + expires, 10).toString(); - } else { - throw AWS.util.error(new Error(), { - message: 'Presigning only supports S3 or SigV4 signing.', - code: 'UnsupportedSigner', retryable: false - }); - } -} - -/** - * @api private - */ -function signedUrlSigner(request) { - var endpoint = request.httpRequest.endpoint; - var parsedUrl = AWS.util.urlParse(request.httpRequest.path); - var queryParams = {}; - - if (parsedUrl.search) { - queryParams = AWS.util.queryStringParse(parsedUrl.search.substr(1)); - } - - var auth = request.httpRequest.headers['Authorization'].split(' '); - if (auth[0] === 'AWS') { - auth = auth[1].split(':'); - queryParams['Signature'] = auth.pop(); - queryParams['AWSAccessKeyId'] = auth.join(':'); - - AWS.util.each(request.httpRequest.headers, function (key, value) { - if (key === expiresHeader) key = 'Expires'; - if (key.indexOf('x-amz-meta-') === 0) { - // Delete existing, potentially not normalized key - delete queryParams[key]; - key = key.toLowerCase(); - } - queryParams[key] = value; - }); - delete request.httpRequest.headers[expiresHeader]; - delete queryParams['Authorization']; - delete queryParams['Host']; - } else if (auth[0] === 'AWS4-HMAC-SHA256') { // SigV4 signing - auth.shift(); - var rest = auth.join(' '); - var signature = rest.match(/Signature=(.*?)(?:,|\s|\r?\n|$)/)[1]; - queryParams['X-Amz-Signature'] = signature; - delete queryParams['Expires']; - } - - // build URL - endpoint.pathname = parsedUrl.pathname; - endpoint.search = AWS.util.queryParamsToString(queryParams); -} - -/** - * @api private - */ -AWS.Signers.Presign = inherit({ - /** - * @api private - */ - sign: function sign(request, expireTime, callback) { - request.httpRequest.headers[expiresHeader] = expireTime || 3600; - request.on('build', signedUrlBuilder); - request.on('sign', signedUrlSigner); - request.removeListener('afterBuild', - AWS.EventListeners.Core.SET_CONTENT_LENGTH); - request.removeListener('afterBuild', - AWS.EventListeners.Core.COMPUTE_SHA256); - - request.emit('beforePresign', [request]); - - if (callback) { - request.build(function() { - if (this.response.error) callback(this.response.error); - else { - callback(null, AWS.util.urlFormat(request.httpRequest.endpoint)); - } - }); - } else { - request.build(); - if (request.response.error) throw request.response.error; - return AWS.util.urlFormat(request.httpRequest.endpoint); - } - } -}); - -/** - * @api private - */ -module.exports = AWS.Signers.Presign; - - -/***/ }), - -/***/ 9897: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -var inherit = AWS.util.inherit; - -/** - * @api private - */ -AWS.Signers.RequestSigner = inherit({ - constructor: function RequestSigner(request) { - this.request = request; - }, - - setServiceClientId: function setServiceClientId(id) { - this.serviceClientId = id; - }, - - getServiceClientId: function getServiceClientId() { - return this.serviceClientId; - } -}); - -AWS.Signers.RequestSigner.getVersion = function getVersion(version) { - switch (version) { - case 'v2': return AWS.Signers.V2; - case 'v3': return AWS.Signers.V3; - case 's3v4': return AWS.Signers.V4; - case 'v4': return AWS.Signers.V4; - case 's3': return AWS.Signers.S3; - case 'v3https': return AWS.Signers.V3Https; - } - throw new Error('Unknown signing version ' + version); -}; - -__nccwpck_require__(28489); -__nccwpck_require__(66458); -__nccwpck_require__(24473); -__nccwpck_require__(26529); -__nccwpck_require__(58616); -__nccwpck_require__(60328); - - -/***/ }), - -/***/ 58616: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var inherit = AWS.util.inherit; - -/** - * @api private - */ -AWS.Signers.S3 = inherit(AWS.Signers.RequestSigner, { - /** - * When building the stringToSign, these sub resource params should be - * part of the canonical resource string with their NON-decoded values - */ - subResources: { - 'acl': 1, - 'accelerate': 1, - 'analytics': 1, - 'cors': 1, - 'lifecycle': 1, - 'delete': 1, - 'inventory': 1, - 'location': 1, - 'logging': 1, - 'metrics': 1, - 'notification': 1, - 'partNumber': 1, - 'policy': 1, - 'requestPayment': 1, - 'replication': 1, - 'restore': 1, - 'tagging': 1, - 'torrent': 1, - 'uploadId': 1, - 'uploads': 1, - 'versionId': 1, - 'versioning': 1, - 'versions': 1, - 'website': 1 - }, - - // when building the stringToSign, these querystring params should be - // part of the canonical resource string with their NON-encoded values - responseHeaders: { - 'response-content-type': 1, - 'response-content-language': 1, - 'response-expires': 1, - 'response-cache-control': 1, - 'response-content-disposition': 1, - 'response-content-encoding': 1 - }, - - addAuthorization: function addAuthorization(credentials, date) { - if (!this.request.headers['presigned-expires']) { - this.request.headers['X-Amz-Date'] = AWS.util.date.rfc822(date); - } - - if (credentials.sessionToken) { - // presigned URLs require this header to be lowercased - this.request.headers['x-amz-security-token'] = credentials.sessionToken; - } - - var signature = this.sign(credentials.secretAccessKey, this.stringToSign()); - var auth = 'AWS ' + credentials.accessKeyId + ':' + signature; - - this.request.headers['Authorization'] = auth; - }, - - stringToSign: function stringToSign() { - var r = this.request; - - var parts = []; - parts.push(r.method); - parts.push(r.headers['Content-MD5'] || ''); - parts.push(r.headers['Content-Type'] || ''); - - // This is the "Date" header, but we use X-Amz-Date. - // The S3 signing mechanism requires us to pass an empty - // string for this Date header regardless. - parts.push(r.headers['presigned-expires'] || ''); - - var headers = this.canonicalizedAmzHeaders(); - if (headers) parts.push(headers); - parts.push(this.canonicalizedResource()); - - return parts.join('\n'); - - }, - - canonicalizedAmzHeaders: function canonicalizedAmzHeaders() { - - var amzHeaders = []; - - AWS.util.each(this.request.headers, function (name) { - if (name.match(/^x-amz-/i)) - amzHeaders.push(name); - }); - - amzHeaders.sort(function (a, b) { - return a.toLowerCase() < b.toLowerCase() ? -1 : 1; - }); - - var parts = []; - AWS.util.arrayEach.call(this, amzHeaders, function (name) { - parts.push(name.toLowerCase() + ':' + String(this.request.headers[name])); - }); - - return parts.join('\n'); - - }, - - canonicalizedResource: function canonicalizedResource() { - - var r = this.request; - - var parts = r.path.split('?'); - var path = parts[0]; - var querystring = parts[1]; - - var resource = ''; - - if (r.virtualHostedBucket) - resource += '/' + r.virtualHostedBucket; - - resource += path; - - if (querystring) { - - // collect a list of sub resources and query params that need to be signed - var resources = []; - - AWS.util.arrayEach.call(this, querystring.split('&'), function (param) { - var name = param.split('=')[0]; - var value = param.split('=')[1]; - if (this.subResources[name] || this.responseHeaders[name]) { - var subresource = { name: name }; - if (value !== undefined) { - if (this.subResources[name]) { - subresource.value = value; - } else { - subresource.value = decodeURIComponent(value); - } - } - resources.push(subresource); - } - }); - - resources.sort(function (a, b) { return a.name < b.name ? -1 : 1; }); - - if (resources.length) { - - querystring = []; - AWS.util.arrayEach(resources, function (res) { - if (res.value === undefined) { - querystring.push(res.name); - } else { - querystring.push(res.name + '=' + res.value); - } - }); - - resource += '?' + querystring.join('&'); - } - - } - - return resource; - - }, - - sign: function sign(secret, string) { - return AWS.util.crypto.hmac(secret, string, 'base64', 'sha1'); - } -}); - -/** - * @api private - */ -module.exports = AWS.Signers.S3; - - -/***/ }), - -/***/ 28489: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var inherit = AWS.util.inherit; - -/** - * @api private - */ -AWS.Signers.V2 = inherit(AWS.Signers.RequestSigner, { - addAuthorization: function addAuthorization(credentials, date) { - - if (!date) date = AWS.util.date.getDate(); - - var r = this.request; - - r.params.Timestamp = AWS.util.date.iso8601(date); - r.params.SignatureVersion = '2'; - r.params.SignatureMethod = 'HmacSHA256'; - r.params.AWSAccessKeyId = credentials.accessKeyId; - - if (credentials.sessionToken) { - r.params.SecurityToken = credentials.sessionToken; - } - - delete r.params.Signature; // delete old Signature for re-signing - r.params.Signature = this.signature(credentials); - - r.body = AWS.util.queryParamsToString(r.params); - r.headers['Content-Length'] = r.body.length; - }, - - signature: function signature(credentials) { - return AWS.util.crypto.hmac(credentials.secretAccessKey, this.stringToSign(), 'base64'); - }, - - stringToSign: function stringToSign() { - var parts = []; - parts.push(this.request.method); - parts.push(this.request.endpoint.host.toLowerCase()); - parts.push(this.request.pathname()); - parts.push(AWS.util.queryParamsToString(this.request.params)); - return parts.join('\n'); - } - -}); - -/** - * @api private - */ -module.exports = AWS.Signers.V2; - - -/***/ }), - -/***/ 66458: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var inherit = AWS.util.inherit; - -/** - * @api private - */ -AWS.Signers.V3 = inherit(AWS.Signers.RequestSigner, { - addAuthorization: function addAuthorization(credentials, date) { - - var datetime = AWS.util.date.rfc822(date); - - this.request.headers['X-Amz-Date'] = datetime; - - if (credentials.sessionToken) { - this.request.headers['x-amz-security-token'] = credentials.sessionToken; - } - - this.request.headers['X-Amzn-Authorization'] = - this.authorization(credentials, datetime); - - }, - - authorization: function authorization(credentials) { - return 'AWS3 ' + - 'AWSAccessKeyId=' + credentials.accessKeyId + ',' + - 'Algorithm=HmacSHA256,' + - 'SignedHeaders=' + this.signedHeaders() + ',' + - 'Signature=' + this.signature(credentials); - }, - - signedHeaders: function signedHeaders() { - var headers = []; - AWS.util.arrayEach(this.headersToSign(), function iterator(h) { - headers.push(h.toLowerCase()); - }); - return headers.sort().join(';'); - }, - - canonicalHeaders: function canonicalHeaders() { - var headers = this.request.headers; - var parts = []; - AWS.util.arrayEach(this.headersToSign(), function iterator(h) { - parts.push(h.toLowerCase().trim() + ':' + String(headers[h]).trim()); - }); - return parts.sort().join('\n') + '\n'; - }, - - headersToSign: function headersToSign() { - var headers = []; - AWS.util.each(this.request.headers, function iterator(k) { - if (k === 'Host' || k === 'Content-Encoding' || k.match(/^X-Amz/i)) { - headers.push(k); - } - }); - return headers; - }, - - signature: function signature(credentials) { - return AWS.util.crypto.hmac(credentials.secretAccessKey, this.stringToSign(), 'base64'); - }, - - stringToSign: function stringToSign() { - var parts = []; - parts.push(this.request.method); - parts.push('/'); - parts.push(''); - parts.push(this.canonicalHeaders()); - parts.push(this.request.body); - return AWS.util.crypto.sha256(parts.join('\n')); - } - -}); - -/** - * @api private - */ -module.exports = AWS.Signers.V3; - - -/***/ }), - -/***/ 24473: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var inherit = AWS.util.inherit; - -__nccwpck_require__(66458); - -/** - * @api private - */ -AWS.Signers.V3Https = inherit(AWS.Signers.V3, { - authorization: function authorization(credentials) { - return 'AWS3-HTTPS ' + - 'AWSAccessKeyId=' + credentials.accessKeyId + ',' + - 'Algorithm=HmacSHA256,' + - 'Signature=' + this.signature(credentials); - }, - - stringToSign: function stringToSign() { - return this.request.headers['X-Amz-Date']; - } -}); - -/** - * @api private - */ -module.exports = AWS.Signers.V3Https; - - -/***/ }), - -/***/ 26529: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var v4Credentials = __nccwpck_require__(62660); -var inherit = AWS.util.inherit; - -/** - * @api private - */ -var expiresHeader = 'presigned-expires'; - -/** - * @api private - */ -AWS.Signers.V4 = inherit(AWS.Signers.RequestSigner, { - constructor: function V4(request, serviceName, options) { - AWS.Signers.RequestSigner.call(this, request); - this.serviceName = serviceName; - options = options || {}; - this.signatureCache = typeof options.signatureCache === 'boolean' ? options.signatureCache : true; - this.operation = options.operation; - this.signatureVersion = options.signatureVersion; - }, - - algorithm: 'AWS4-HMAC-SHA256', - - addAuthorization: function addAuthorization(credentials, date) { - var datetime = AWS.util.date.iso8601(date).replace(/[:\-]|\.\d{3}/g, ''); - - if (this.isPresigned()) { - this.updateForPresigned(credentials, datetime); - } else { - this.addHeaders(credentials, datetime); - } - - this.request.headers['Authorization'] = - this.authorization(credentials, datetime); - }, - - addHeaders: function addHeaders(credentials, datetime) { - this.request.headers['X-Amz-Date'] = datetime; - if (credentials.sessionToken) { - this.request.headers['x-amz-security-token'] = credentials.sessionToken; - } - }, - - updateForPresigned: function updateForPresigned(credentials, datetime) { - var credString = this.credentialString(datetime); - var qs = { - 'X-Amz-Date': datetime, - 'X-Amz-Algorithm': this.algorithm, - 'X-Amz-Credential': credentials.accessKeyId + '/' + credString, - 'X-Amz-Expires': this.request.headers[expiresHeader], - 'X-Amz-SignedHeaders': this.signedHeaders() - }; - - if (credentials.sessionToken) { - qs['X-Amz-Security-Token'] = credentials.sessionToken; - } - - if (this.request.headers['Content-Type']) { - qs['Content-Type'] = this.request.headers['Content-Type']; - } - if (this.request.headers['Content-MD5']) { - qs['Content-MD5'] = this.request.headers['Content-MD5']; - } - if (this.request.headers['Cache-Control']) { - qs['Cache-Control'] = this.request.headers['Cache-Control']; - } - - // need to pull in any other X-Amz-* headers - AWS.util.each.call(this, this.request.headers, function(key, value) { - if (key === expiresHeader) return; - if (this.isSignableHeader(key)) { - var lowerKey = key.toLowerCase(); - // Metadata should be normalized - if (lowerKey.indexOf('x-amz-meta-') === 0) { - qs[lowerKey] = value; - } else if (lowerKey.indexOf('x-amz-') === 0) { - qs[key] = value; - } - } - }); - - var sep = this.request.path.indexOf('?') >= 0 ? '&' : '?'; - this.request.path += sep + AWS.util.queryParamsToString(qs); - }, - - authorization: function authorization(credentials, datetime) { - var parts = []; - var credString = this.credentialString(datetime); - parts.push(this.algorithm + ' Credential=' + - credentials.accessKeyId + '/' + credString); - parts.push('SignedHeaders=' + this.signedHeaders()); - parts.push('Signature=' + this.signature(credentials, datetime)); - return parts.join(', '); - }, - - signature: function signature(credentials, datetime) { - var signingKey = v4Credentials.getSigningKey( - credentials, - datetime.substr(0, 8), - this.request.region, - this.serviceName, - this.signatureCache - ); - return AWS.util.crypto.hmac(signingKey, this.stringToSign(datetime), 'hex'); - }, - - stringToSign: function stringToSign(datetime) { - var parts = []; - parts.push('AWS4-HMAC-SHA256'); - parts.push(datetime); - parts.push(this.credentialString(datetime)); - parts.push(this.hexEncodedHash(this.canonicalString())); - return parts.join('\n'); - }, - - canonicalString: function canonicalString() { - var parts = [], pathname = this.request.pathname(); - if (this.serviceName !== 's3' && this.signatureVersion !== 's3v4') pathname = AWS.util.uriEscapePath(pathname); - - parts.push(this.request.method); - parts.push(pathname); - parts.push(this.request.search()); - parts.push(this.canonicalHeaders() + '\n'); - parts.push(this.signedHeaders()); - parts.push(this.hexEncodedBodyHash()); - return parts.join('\n'); - }, - - canonicalHeaders: function canonicalHeaders() { - var headers = []; - AWS.util.each.call(this, this.request.headers, function (key, item) { - headers.push([key, item]); - }); - headers.sort(function (a, b) { - return a[0].toLowerCase() < b[0].toLowerCase() ? -1 : 1; - }); - var parts = []; - AWS.util.arrayEach.call(this, headers, function (item) { - var key = item[0].toLowerCase(); - if (this.isSignableHeader(key)) { - var value = item[1]; - if (typeof value === 'undefined' || value === null || typeof value.toString !== 'function') { - throw AWS.util.error(new Error('Header ' + key + ' contains invalid value'), { - code: 'InvalidHeader' - }); - } - parts.push(key + ':' + - this.canonicalHeaderValues(value.toString())); - } - }); - return parts.join('\n'); - }, - - canonicalHeaderValues: function canonicalHeaderValues(values) { - return values.replace(/\s+/g, ' ').replace(/^\s+|\s+$/g, ''); - }, - - signedHeaders: function signedHeaders() { - var keys = []; - AWS.util.each.call(this, this.request.headers, function (key) { - key = key.toLowerCase(); - if (this.isSignableHeader(key)) keys.push(key); - }); - return keys.sort().join(';'); - }, - - credentialString: function credentialString(datetime) { - return v4Credentials.createScope( - datetime.substr(0, 8), - this.request.region, - this.serviceName - ); - }, - - hexEncodedHash: function hash(string) { - return AWS.util.crypto.sha256(string, 'hex'); - }, - - hexEncodedBodyHash: function hexEncodedBodyHash() { - var request = this.request; - if (this.isPresigned() && (['s3', 's3-object-lambda'].indexOf(this.serviceName) > -1) && !request.body) { - return 'UNSIGNED-PAYLOAD'; - } else if (request.headers['X-Amz-Content-Sha256']) { - return request.headers['X-Amz-Content-Sha256']; - } else { - return this.hexEncodedHash(this.request.body || ''); - } - }, - - unsignableHeaders: [ - 'authorization', - 'content-type', - 'content-length', - 'user-agent', - expiresHeader, - 'expect', - 'x-amzn-trace-id' - ], - - isSignableHeader: function isSignableHeader(key) { - if (key.toLowerCase().indexOf('x-amz-') === 0) return true; - return this.unsignableHeaders.indexOf(key) < 0; - }, - - isPresigned: function isPresigned() { - return this.request.headers[expiresHeader] ? true : false; - } - -}); - -/** - * @api private - */ -module.exports = AWS.Signers.V4; - - -/***/ }), - -/***/ 62660: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); - -/** - * @api private - */ -var cachedSecret = {}; - -/** - * @api private - */ -var cacheQueue = []; - -/** - * @api private - */ -var maxCacheEntries = 50; - -/** - * @api private - */ -var v4Identifier = 'aws4_request'; - -/** - * @api private - */ -module.exports = { - /** - * @api private - * - * @param date [String] - * @param region [String] - * @param serviceName [String] - * @return [String] - */ - createScope: function createScope(date, region, serviceName) { - return [ - date.substr(0, 8), - region, - serviceName, - v4Identifier - ].join('/'); - }, - - /** - * @api private - * - * @param credentials [Credentials] - * @param date [String] - * @param region [String] - * @param service [String] - * @param shouldCache [Boolean] - * @return [String] - */ - getSigningKey: function getSigningKey( - credentials, - date, - region, - service, - shouldCache - ) { - var credsIdentifier = AWS.util.crypto - .hmac(credentials.secretAccessKey, credentials.accessKeyId, 'base64'); - var cacheKey = [credsIdentifier, date, region, service].join('_'); - shouldCache = shouldCache !== false; - if (shouldCache && (cacheKey in cachedSecret)) { - return cachedSecret[cacheKey]; - } - - var kDate = AWS.util.crypto.hmac( - 'AWS4' + credentials.secretAccessKey, - date, - 'buffer' - ); - var kRegion = AWS.util.crypto.hmac(kDate, region, 'buffer'); - var kService = AWS.util.crypto.hmac(kRegion, service, 'buffer'); - - var signingKey = AWS.util.crypto.hmac(kService, v4Identifier, 'buffer'); - if (shouldCache) { - cachedSecret[cacheKey] = signingKey; - cacheQueue.push(cacheKey); - if (cacheQueue.length > maxCacheEntries) { - // remove the oldest entry (not the least recently used) - delete cachedSecret[cacheQueue.shift()]; - } - } - - return signingKey; - }, - - /** - * @api private - * - * Empties the derived signing key cache. Made available for testing purposes - * only. - */ - emptyCache: function emptyCache() { - cachedSecret = {}; - cacheQueue = []; - } -}; - - -/***/ }), - -/***/ 68118: -/***/ ((module) => { - -function AcceptorStateMachine(states, state) { - this.currentState = state || null; - this.states = states || {}; -} - -AcceptorStateMachine.prototype.runTo = function runTo(finalState, done, bindObject, inputError) { - if (typeof finalState === 'function') { - inputError = bindObject; bindObject = done; - done = finalState; finalState = null; - } - - var self = this; - var state = self.states[self.currentState]; - state.fn.call(bindObject || self, inputError, function(err) { - if (err) { - if (state.fail) self.currentState = state.fail; - else return done ? done.call(bindObject, err) : null; - } else { - if (state.accept) self.currentState = state.accept; - else return done ? done.call(bindObject) : null; - } - if (self.currentState === finalState) { - return done ? done.call(bindObject, err) : null; - } - - self.runTo(finalState, done, bindObject, err); - }); -}; - -AcceptorStateMachine.prototype.addState = function addState(name, acceptState, failState, fn) { - if (typeof acceptState === 'function') { - fn = acceptState; acceptState = null; failState = null; - } else if (typeof failState === 'function') { - fn = failState; failState = null; - } - - if (!this.currentState) this.currentState = name; - this.states[name] = { accept: acceptState, fail: failState, fn: fn }; - return this; -}; - -/** - * @api private - */ -module.exports = AcceptorStateMachine; - - -/***/ }), - -/***/ 77985: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* eslint guard-for-in:0 */ -var AWS; - -/** - * A set of utility methods for use with the AWS SDK. - * - * @!attribute abort - * Return this value from an iterator function {each} or {arrayEach} - * to break out of the iteration. - * @example Breaking out of an iterator function - * AWS.util.each({a: 1, b: 2, c: 3}, function(key, value) { - * if (key == 'b') return AWS.util.abort; - * }); - * @see each - * @see arrayEach - * @api private - */ -var util = { - environment: 'nodejs', - engine: function engine() { - if (util.isBrowser() && typeof navigator !== 'undefined') { - return navigator.userAgent; - } else { - var engine = process.platform + '/' + process.version; - if (process.env.AWS_EXECUTION_ENV) { - engine += ' exec-env/' + process.env.AWS_EXECUTION_ENV; - } - return engine; - } - }, - - userAgent: function userAgent() { - var name = util.environment; - var agent = 'aws-sdk-' + name + '/' + __nccwpck_require__(28437).VERSION; - if (name === 'nodejs') agent += ' ' + util.engine(); - return agent; - }, - - uriEscape: function uriEscape(string) { - var output = encodeURIComponent(string); - output = output.replace(/[^A-Za-z0-9_.~\-%]+/g, escape); - - // AWS percent-encodes some extra non-standard characters in a URI - output = output.replace(/[*]/g, function(ch) { - return '%' + ch.charCodeAt(0).toString(16).toUpperCase(); - }); - - return output; - }, - - uriEscapePath: function uriEscapePath(string) { - var parts = []; - util.arrayEach(string.split('/'), function (part) { - parts.push(util.uriEscape(part)); - }); - return parts.join('/'); - }, - - urlParse: function urlParse(url) { - return util.url.parse(url); - }, - - urlFormat: function urlFormat(url) { - return util.url.format(url); - }, - - queryStringParse: function queryStringParse(qs) { - return util.querystring.parse(qs); - }, - - queryParamsToString: function queryParamsToString(params) { - var items = []; - var escape = util.uriEscape; - var sortedKeys = Object.keys(params).sort(); - - util.arrayEach(sortedKeys, function(name) { - var value = params[name]; - var ename = escape(name); - var result = ename + '='; - if (Array.isArray(value)) { - var vals = []; - util.arrayEach(value, function(item) { vals.push(escape(item)); }); - result = ename + '=' + vals.sort().join('&' + ename + '='); - } else if (value !== undefined && value !== null) { - result = ename + '=' + escape(value); - } - items.push(result); - }); - - return items.join('&'); - }, - - readFileSync: function readFileSync(path) { - if (util.isBrowser()) return null; - return __nccwpck_require__(35747).readFileSync(path, 'utf-8'); - }, - - base64: { - encode: function encode64(string) { - if (typeof string === 'number') { - throw util.error(new Error('Cannot base64 encode number ' + string)); - } - if (string === null || typeof string === 'undefined') { - return string; - } - var buf = util.buffer.toBuffer(string); - return buf.toString('base64'); - }, - - decode: function decode64(string) { - if (typeof string === 'number') { - throw util.error(new Error('Cannot base64 decode number ' + string)); - } - if (string === null || typeof string === 'undefined') { - return string; - } - return util.buffer.toBuffer(string, 'base64'); - } - - }, - - buffer: { - /** - * Buffer constructor for Node buffer and buffer pollyfill - */ - toBuffer: function(data, encoding) { - return (typeof util.Buffer.from === 'function' && util.Buffer.from !== Uint8Array.from) ? - util.Buffer.from(data, encoding) : new util.Buffer(data, encoding); - }, - - alloc: function(size, fill, encoding) { - if (typeof size !== 'number') { - throw new Error('size passed to alloc must be a number.'); - } - if (typeof util.Buffer.alloc === 'function') { - return util.Buffer.alloc(size, fill, encoding); - } else { - var buf = new util.Buffer(size); - if (fill !== undefined && typeof buf.fill === 'function') { - buf.fill(fill, undefined, undefined, encoding); - } - return buf; - } - }, - - toStream: function toStream(buffer) { - if (!util.Buffer.isBuffer(buffer)) buffer = util.buffer.toBuffer(buffer); - - var readable = new (util.stream.Readable)(); - var pos = 0; - readable._read = function(size) { - if (pos >= buffer.length) return readable.push(null); - - var end = pos + size; - if (end > buffer.length) end = buffer.length; - readable.push(buffer.slice(pos, end)); - pos = end; - }; - - return readable; - }, - - /** - * Concatenates a list of Buffer objects. - */ - concat: function(buffers) { - var length = 0, - offset = 0, - buffer = null, i; - - for (i = 0; i < buffers.length; i++) { - length += buffers[i].length; - } - - buffer = util.buffer.alloc(length); - - for (i = 0; i < buffers.length; i++) { - buffers[i].copy(buffer, offset); - offset += buffers[i].length; - } - - return buffer; - } - }, - - string: { - byteLength: function byteLength(string) { - if (string === null || string === undefined) return 0; - if (typeof string === 'string') string = util.buffer.toBuffer(string); - - if (typeof string.byteLength === 'number') { - return string.byteLength; - } else if (typeof string.length === 'number') { - return string.length; - } else if (typeof string.size === 'number') { - return string.size; - } else if (typeof string.path === 'string') { - return __nccwpck_require__(35747).lstatSync(string.path).size; - } else { - throw util.error(new Error('Cannot determine length of ' + string), - { object: string }); - } - }, - - upperFirst: function upperFirst(string) { - return string[0].toUpperCase() + string.substr(1); - }, - - lowerFirst: function lowerFirst(string) { - return string[0].toLowerCase() + string.substr(1); - } - }, - - ini: { - parse: function string(ini) { - var currentSection, map = {}; - util.arrayEach(ini.split(/\r?\n/), function(line) { - line = line.split(/(^|\s)[;#]/)[0]; // remove comments - var section = line.match(/^\s*\[([^\[\]]+)\]\s*$/); - if (section) { - currentSection = section[1]; - if (currentSection === '__proto__' || currentSection.split(/\s/)[1] === '__proto__') { - throw util.error( - new Error('Cannot load profile name \'' + currentSection + '\' from shared ini file.') - ); - } - } else if (currentSection) { - var item = line.match(/^\s*(.+?)\s*=\s*(.+?)\s*$/); - if (item) { - map[currentSection] = map[currentSection] || {}; - map[currentSection][item[1]] = item[2]; - } - } - }); - - return map; - } - }, - - fn: { - noop: function() {}, - callback: function (err) { if (err) throw err; }, - - /** - * Turn a synchronous function into as "async" function by making it call - * a callback. The underlying function is called with all but the last argument, - * which is treated as the callback. The callback is passed passed a first argument - * of null on success to mimick standard node callbacks. - */ - makeAsync: function makeAsync(fn, expectedArgs) { - if (expectedArgs && expectedArgs <= fn.length) { - return fn; - } - - return function() { - var args = Array.prototype.slice.call(arguments, 0); - var callback = args.pop(); - var result = fn.apply(null, args); - callback(result); - }; - } - }, - - /** - * Date and time utility functions. - */ - date: { - - /** - * @return [Date] the current JavaScript date object. Since all - * AWS services rely on this date object, you can override - * this function to provide a special time value to AWS service - * requests. - */ - getDate: function getDate() { - if (!AWS) AWS = __nccwpck_require__(28437); - if (AWS.config.systemClockOffset) { // use offset when non-zero - return new Date(new Date().getTime() + AWS.config.systemClockOffset); - } else { - return new Date(); - } - }, - - /** - * @return [String] the date in ISO-8601 format - */ - iso8601: function iso8601(date) { - if (date === undefined) { date = util.date.getDate(); } - return date.toISOString().replace(/\.\d{3}Z$/, 'Z'); - }, - - /** - * @return [String] the date in RFC 822 format - */ - rfc822: function rfc822(date) { - if (date === undefined) { date = util.date.getDate(); } - return date.toUTCString(); - }, - - /** - * @return [Integer] the UNIX timestamp value for the current time - */ - unixTimestamp: function unixTimestamp(date) { - if (date === undefined) { date = util.date.getDate(); } - return date.getTime() / 1000; - }, - - /** - * @param [String,number,Date] date - * @return [Date] - */ - from: function format(date) { - if (typeof date === 'number') { - return new Date(date * 1000); // unix timestamp - } else { - return new Date(date); - } - }, - - /** - * Given a Date or date-like value, this function formats the - * date into a string of the requested value. - * @param [String,number,Date] date - * @param [String] formatter Valid formats are: - # * 'iso8601' - # * 'rfc822' - # * 'unixTimestamp' - * @return [String] - */ - format: function format(date, formatter) { - if (!formatter) formatter = 'iso8601'; - return util.date[formatter](util.date.from(date)); - }, - - parseTimestamp: function parseTimestamp(value) { - if (typeof value === 'number') { // unix timestamp (number) - return new Date(value * 1000); - } else if (value.match(/^\d+$/)) { // unix timestamp - return new Date(value * 1000); - } else if (value.match(/^\d{4}/)) { // iso8601 - return new Date(value); - } else if (value.match(/^\w{3},/)) { // rfc822 - return new Date(value); - } else { - throw util.error( - new Error('unhandled timestamp format: ' + value), - {code: 'TimestampParserError'}); - } - } - - }, - - crypto: { - crc32Table: [ - 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, - 0x706AF48F, 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4, - 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, - 0x90BF1D91, 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, - 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, 0x136C9856, - 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, - 0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4, - 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, - 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, - 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, 0x26D930AC, 0x51DE003A, - 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, - 0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, - 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, 0x76DC4190, - 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, - 0x9FBFE4A5, 0xE8B8D433, 0x7807C9A2, 0x0F00F934, 0x9609A88E, - 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, - 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED, - 0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950, - 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, - 0xFBD44C65, 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, - 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A, - 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5, - 0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA, 0xBE0B1010, - 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, - 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, - 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6, - 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615, - 0x73DC1683, 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, - 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, 0xF00F9344, - 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, - 0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, - 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, - 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, - 0xA6BC5767, 0x3FB506DD, 0x48B2364B, 0xD80D2BDA, 0xAF0A1B4C, - 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, - 0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, - 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE, - 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, - 0x2CD99E8B, 0x5BDEAE1D, 0x9B64C2B0, 0xEC63F226, 0x756AA39C, - 0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, - 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B, - 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242, - 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, - 0x18B74777, 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, - 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, 0xA00AE278, - 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7, - 0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, - 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, - 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, - 0xCDD70693, 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8, - 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, - 0x2D02EF8D], - - crc32: function crc32(data) { - var tbl = util.crypto.crc32Table; - var crc = 0 ^ -1; - - if (typeof data === 'string') { - data = util.buffer.toBuffer(data); - } - - for (var i = 0; i < data.length; i++) { - var code = data.readUInt8(i); - crc = (crc >>> 8) ^ tbl[(crc ^ code) & 0xFF]; - } - return (crc ^ -1) >>> 0; - }, - - hmac: function hmac(key, string, digest, fn) { - if (!digest) digest = 'binary'; - if (digest === 'buffer') { digest = undefined; } - if (!fn) fn = 'sha256'; - if (typeof string === 'string') string = util.buffer.toBuffer(string); - return util.crypto.lib.createHmac(fn, key).update(string).digest(digest); - }, - - md5: function md5(data, digest, callback) { - return util.crypto.hash('md5', data, digest, callback); - }, - - sha256: function sha256(data, digest, callback) { - return util.crypto.hash('sha256', data, digest, callback); - }, - - hash: function(algorithm, data, digest, callback) { - var hash = util.crypto.createHash(algorithm); - if (!digest) { digest = 'binary'; } - if (digest === 'buffer') { digest = undefined; } - if (typeof data === 'string') data = util.buffer.toBuffer(data); - var sliceFn = util.arraySliceFn(data); - var isBuffer = util.Buffer.isBuffer(data); - //Identifying objects with an ArrayBuffer as buffers - if (util.isBrowser() && typeof ArrayBuffer !== 'undefined' && data && data.buffer instanceof ArrayBuffer) isBuffer = true; - - if (callback && typeof data === 'object' && - typeof data.on === 'function' && !isBuffer) { - data.on('data', function(chunk) { hash.update(chunk); }); - data.on('error', function(err) { callback(err); }); - data.on('end', function() { callback(null, hash.digest(digest)); }); - } else if (callback && sliceFn && !isBuffer && - typeof FileReader !== 'undefined') { - // this might be a File/Blob - var index = 0, size = 1024 * 512; - var reader = new FileReader(); - reader.onerror = function() { - callback(new Error('Failed to read data.')); - }; - reader.onload = function() { - var buf = new util.Buffer(new Uint8Array(reader.result)); - hash.update(buf); - index += buf.length; - reader._continueReading(); - }; - reader._continueReading = function() { - if (index >= data.size) { - callback(null, hash.digest(digest)); - return; - } - - var back = index + size; - if (back > data.size) back = data.size; - reader.readAsArrayBuffer(sliceFn.call(data, index, back)); - }; - - reader._continueReading(); - } else { - if (util.isBrowser() && typeof data === 'object' && !isBuffer) { - data = new util.Buffer(new Uint8Array(data)); - } - var out = hash.update(data).digest(digest); - if (callback) callback(null, out); - return out; - } - }, - - toHex: function toHex(data) { - var out = []; - for (var i = 0; i < data.length; i++) { - out.push(('0' + data.charCodeAt(i).toString(16)).substr(-2, 2)); - } - return out.join(''); - }, - - createHash: function createHash(algorithm) { - return util.crypto.lib.createHash(algorithm); - } - - }, - - /** @!ignore */ - - /* Abort constant */ - abort: {}, - - each: function each(object, iterFunction) { - for (var key in object) { - if (Object.prototype.hasOwnProperty.call(object, key)) { - var ret = iterFunction.call(this, key, object[key]); - if (ret === util.abort) break; - } - } - }, - - arrayEach: function arrayEach(array, iterFunction) { - for (var idx in array) { - if (Object.prototype.hasOwnProperty.call(array, idx)) { - var ret = iterFunction.call(this, array[idx], parseInt(idx, 10)); - if (ret === util.abort) break; - } - } - }, - - update: function update(obj1, obj2) { - util.each(obj2, function iterator(key, item) { - obj1[key] = item; - }); - return obj1; - }, - - merge: function merge(obj1, obj2) { - return util.update(util.copy(obj1), obj2); - }, - - copy: function copy(object) { - if (object === null || object === undefined) return object; - var dupe = {}; - // jshint forin:false - for (var key in object) { - dupe[key] = object[key]; - } - return dupe; - }, - - isEmpty: function isEmpty(obj) { - for (var prop in obj) { - if (Object.prototype.hasOwnProperty.call(obj, prop)) { - return false; - } - } - return true; - }, - - arraySliceFn: function arraySliceFn(obj) { - var fn = obj.slice || obj.webkitSlice || obj.mozSlice; - return typeof fn === 'function' ? fn : null; - }, - - isType: function isType(obj, type) { - // handle cross-"frame" objects - if (typeof type === 'function') type = util.typeName(type); - return Object.prototype.toString.call(obj) === '[object ' + type + ']'; - }, - - typeName: function typeName(type) { - if (Object.prototype.hasOwnProperty.call(type, 'name')) return type.name; - var str = type.toString(); - var match = str.match(/^\s*function (.+)\(/); - return match ? match[1] : str; - }, - - error: function error(err, options) { - var originalError = null; - if (typeof err.message === 'string' && err.message !== '') { - if (typeof options === 'string' || (options && options.message)) { - originalError = util.copy(err); - originalError.message = err.message; - } - } - err.message = err.message || null; - - if (typeof options === 'string') { - err.message = options; - } else if (typeof options === 'object' && options !== null) { - util.update(err, options); - if (options.message) - err.message = options.message; - if (options.code || options.name) - err.code = options.code || options.name; - if (options.stack) - err.stack = options.stack; - } - - if (typeof Object.defineProperty === 'function') { - Object.defineProperty(err, 'name', {writable: true, enumerable: false}); - Object.defineProperty(err, 'message', {enumerable: true}); - } - - err.name = String(options && options.name || err.name || err.code || 'Error'); - err.time = new Date(); - - if (originalError) err.originalError = originalError; - - return err; - }, - - /** - * @api private - */ - inherit: function inherit(klass, features) { - var newObject = null; - if (features === undefined) { - features = klass; - klass = Object; - newObject = {}; - } else { - var ctor = function ConstructorWrapper() {}; - ctor.prototype = klass.prototype; - newObject = new ctor(); - } - - // constructor not supplied, create pass-through ctor - if (features.constructor === Object) { - features.constructor = function() { - if (klass !== Object) { - return klass.apply(this, arguments); - } - }; - } - - features.constructor.prototype = newObject; - util.update(features.constructor.prototype, features); - features.constructor.__super__ = klass; - return features.constructor; - }, - - /** - * @api private - */ - mixin: function mixin() { - var klass = arguments[0]; - for (var i = 1; i < arguments.length; i++) { - // jshint forin:false - for (var prop in arguments[i].prototype) { - var fn = arguments[i].prototype[prop]; - if (prop !== 'constructor') { - klass.prototype[prop] = fn; - } - } - } - return klass; - }, - - /** - * @api private - */ - hideProperties: function hideProperties(obj, props) { - if (typeof Object.defineProperty !== 'function') return; - - util.arrayEach(props, function (key) { - Object.defineProperty(obj, key, { - enumerable: false, writable: true, configurable: true }); - }); - }, - - /** - * @api private - */ - property: function property(obj, name, value, enumerable, isValue) { - var opts = { - configurable: true, - enumerable: enumerable !== undefined ? enumerable : true - }; - if (typeof value === 'function' && !isValue) { - opts.get = value; - } - else { - opts.value = value; opts.writable = true; - } - - Object.defineProperty(obj, name, opts); - }, - - /** - * @api private - */ - memoizedProperty: function memoizedProperty(obj, name, get, enumerable) { - var cachedValue = null; - - // build enumerable attribute for each value with lazy accessor. - util.property(obj, name, function() { - if (cachedValue === null) { - cachedValue = get(); - } - return cachedValue; - }, enumerable); - }, - - /** - * TODO Remove in major version revision - * This backfill populates response data without the - * top-level payload name. - * - * @api private - */ - hoistPayloadMember: function hoistPayloadMember(resp) { - var req = resp.request; - var operationName = req.operation; - var operation = req.service.api.operations[operationName]; - var output = operation.output; - if (output.payload && !operation.hasEventOutput) { - var payloadMember = output.members[output.payload]; - var responsePayload = resp.data[output.payload]; - if (payloadMember.type === 'structure') { - util.each(responsePayload, function(key, value) { - util.property(resp.data, key, value, false); - }); - } - } - }, - - /** - * Compute SHA-256 checksums of streams - * - * @api private - */ - computeSha256: function computeSha256(body, done) { - if (util.isNode()) { - var Stream = util.stream.Stream; - var fs = __nccwpck_require__(35747); - if (typeof Stream === 'function' && body instanceof Stream) { - if (typeof body.path === 'string') { // assume file object - var settings = {}; - if (typeof body.start === 'number') { - settings.start = body.start; - } - if (typeof body.end === 'number') { - settings.end = body.end; - } - body = fs.createReadStream(body.path, settings); - } else { // TODO support other stream types - return done(new Error('Non-file stream objects are ' + - 'not supported with SigV4')); - } - } - } - - util.crypto.sha256(body, 'hex', function(err, sha) { - if (err) done(err); - else done(null, sha); - }); - }, - - /** - * @api private - */ - isClockSkewed: function isClockSkewed(serverTime) { - if (serverTime) { - util.property(AWS.config, 'isClockSkewed', - Math.abs(new Date().getTime() - serverTime) >= 300000, false); - return AWS.config.isClockSkewed; - } - }, - - applyClockOffset: function applyClockOffset(serverTime) { - if (serverTime) - AWS.config.systemClockOffset = serverTime - new Date().getTime(); - }, - - /** - * @api private - */ - extractRequestId: function extractRequestId(resp) { - var requestId = resp.httpResponse.headers['x-amz-request-id'] || - resp.httpResponse.headers['x-amzn-requestid']; - - if (!requestId && resp.data && resp.data.ResponseMetadata) { - requestId = resp.data.ResponseMetadata.RequestId; - } - - if (requestId) { - resp.requestId = requestId; - } - - if (resp.error) { - resp.error.requestId = requestId; - } - }, - - /** - * @api private - */ - addPromises: function addPromises(constructors, PromiseDependency) { - var deletePromises = false; - if (PromiseDependency === undefined && AWS && AWS.config) { - PromiseDependency = AWS.config.getPromisesDependency(); - } - if (PromiseDependency === undefined && typeof Promise !== 'undefined') { - PromiseDependency = Promise; - } - if (typeof PromiseDependency !== 'function') deletePromises = true; - if (!Array.isArray(constructors)) constructors = [constructors]; - - for (var ind = 0; ind < constructors.length; ind++) { - var constructor = constructors[ind]; - if (deletePromises) { - if (constructor.deletePromisesFromClass) { - constructor.deletePromisesFromClass(); - } - } else if (constructor.addPromisesToClass) { - constructor.addPromisesToClass(PromiseDependency); - } - } - }, - - /** - * @api private - * Return a function that will return a promise whose fate is decided by the - * callback behavior of the given method with `methodName`. The method to be - * promisified should conform to node.js convention of accepting a callback as - * last argument and calling that callback with error as the first argument - * and success value on the second argument. - */ - promisifyMethod: function promisifyMethod(methodName, PromiseDependency) { - return function promise() { - var self = this; - var args = Array.prototype.slice.call(arguments); - return new PromiseDependency(function(resolve, reject) { - args.push(function(err, data) { - if (err) { - reject(err); - } else { - resolve(data); - } - }); - self[methodName].apply(self, args); - }); - }; - }, - - /** - * @api private - */ - isDualstackAvailable: function isDualstackAvailable(service) { - if (!service) return false; - var metadata = __nccwpck_require__(49497); - if (typeof service !== 'string') service = service.serviceIdentifier; - if (typeof service !== 'string' || !metadata.hasOwnProperty(service)) return false; - return !!metadata[service].dualstackAvailable; - }, - - /** - * @api private - */ - calculateRetryDelay: function calculateRetryDelay(retryCount, retryDelayOptions, err) { - if (!retryDelayOptions) retryDelayOptions = {}; - var customBackoff = retryDelayOptions.customBackoff || null; - if (typeof customBackoff === 'function') { - return customBackoff(retryCount, err); - } - var base = typeof retryDelayOptions.base === 'number' ? retryDelayOptions.base : 100; - var delay = Math.random() * (Math.pow(2, retryCount) * base); - return delay; - }, - - /** - * @api private - */ - handleRequestWithRetries: function handleRequestWithRetries(httpRequest, options, cb) { - if (!options) options = {}; - var http = AWS.HttpClient.getInstance(); - var httpOptions = options.httpOptions || {}; - var retryCount = 0; - - var errCallback = function(err) { - var maxRetries = options.maxRetries || 0; - if (err && err.code === 'TimeoutError') err.retryable = true; - - // Call `calculateRetryDelay()` only when relevant, see #3401 - if (err && err.retryable && retryCount < maxRetries) { - var delay = util.calculateRetryDelay(retryCount, options.retryDelayOptions, err); - if (delay >= 0) { - retryCount++; - setTimeout(sendRequest, delay + (err.retryAfter || 0)); - return; - } - } - cb(err); - }; - - var sendRequest = function() { - var data = ''; - http.handleRequest(httpRequest, httpOptions, function(httpResponse) { - httpResponse.on('data', function(chunk) { data += chunk.toString(); }); - httpResponse.on('end', function() { - var statusCode = httpResponse.statusCode; - if (statusCode < 300) { - cb(null, data); - } else { - var retryAfter = parseInt(httpResponse.headers['retry-after'], 10) * 1000 || 0; - var err = util.error(new Error(), - { - statusCode: statusCode, - retryable: statusCode >= 500 || statusCode === 429 - } - ); - if (retryAfter && err.retryable) err.retryAfter = retryAfter; - errCallback(err); - } - }); - }, errCallback); - }; - - AWS.util.defer(sendRequest); - }, - - /** - * @api private - */ - uuid: { - v4: function uuidV4() { - return __nccwpck_require__(2155).v4(); - } - }, - - /** - * @api private - */ - convertPayloadToString: function convertPayloadToString(resp) { - var req = resp.request; - var operation = req.operation; - var rules = req.service.api.operations[operation].output || {}; - if (rules.payload && resp.data[rules.payload]) { - resp.data[rules.payload] = resp.data[rules.payload].toString(); - } - }, - - /** - * @api private - */ - defer: function defer(callback) { - if (typeof process === 'object' && typeof process.nextTick === 'function') { - process.nextTick(callback); - } else if (typeof setImmediate === 'function') { - setImmediate(callback); - } else { - setTimeout(callback, 0); - } - }, - - /** - * @api private - */ - getRequestPayloadShape: function getRequestPayloadShape(req) { - var operations = req.service.api.operations; - if (!operations) return undefined; - var operation = (operations || {})[req.operation]; - if (!operation || !operation.input || !operation.input.payload) return undefined; - return operation.input.members[operation.input.payload]; - }, - - getProfilesFromSharedConfig: function getProfilesFromSharedConfig(iniLoader, filename) { - var profiles = {}; - var profilesFromConfig = {}; - if (process.env[util.configOptInEnv]) { - var profilesFromConfig = iniLoader.loadFrom({ - isConfig: true, - filename: process.env[util.sharedConfigFileEnv] - }); - } - var profilesFromCreds= {}; - try { - var profilesFromCreds = iniLoader.loadFrom({ - filename: filename || - (process.env[util.configOptInEnv] && process.env[util.sharedCredentialsFileEnv]) - }); - } catch (error) { - // if using config, assume it is fully descriptive without a credentials file: - if (!process.env[util.configOptInEnv]) throw error; - } - for (var i = 0, profileNames = Object.keys(profilesFromConfig); i < profileNames.length; i++) { - profiles[profileNames[i]] = objectAssign(profiles[profileNames[i]] || {}, profilesFromConfig[profileNames[i]]); - } - for (var i = 0, profileNames = Object.keys(profilesFromCreds); i < profileNames.length; i++) { - profiles[profileNames[i]] = objectAssign(profiles[profileNames[i]] || {}, profilesFromCreds[profileNames[i]]); - } - return profiles; - - /** - * Roughly the semantics of `Object.assign(target, source)` - */ - function objectAssign(target, source) { - for (var i = 0, keys = Object.keys(source); i < keys.length; i++) { - target[keys[i]] = source[keys[i]]; - } - return target; - } - }, - - /** - * @api private - */ - ARN: { - validate: function validateARN(str) { - return str && str.indexOf('arn:') === 0 && str.split(':').length >= 6; - }, - parse: function parseARN(arn) { - var matched = arn.split(':'); - return { - partition: matched[1], - service: matched[2], - region: matched[3], - accountId: matched[4], - resource: matched.slice(5).join(':') - }; - }, - build: function buildARN(arnObject) { - if ( - arnObject.service === undefined || - arnObject.region === undefined || - arnObject.accountId === undefined || - arnObject.resource === undefined - ) throw util.error(new Error('Input ARN object is invalid')); - return 'arn:'+ (arnObject.partition || 'aws') + ':' + arnObject.service + - ':' + arnObject.region + ':' + arnObject.accountId + ':' + arnObject.resource; - } - }, - - /** - * @api private - */ - defaultProfile: 'default', - - /** - * @api private - */ - configOptInEnv: 'AWS_SDK_LOAD_CONFIG', - - /** - * @api private - */ - sharedCredentialsFileEnv: 'AWS_SHARED_CREDENTIALS_FILE', - - /** - * @api private - */ - sharedConfigFileEnv: 'AWS_CONFIG_FILE', - - /** - * @api private - */ - imdsDisabledEnv: 'AWS_EC2_METADATA_DISABLED' -}; - -/** - * @api private - */ -module.exports = util; - - -/***/ }), - -/***/ 23546: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var util = __nccwpck_require__(77985); -var XmlNode = __nccwpck_require__(20397).XmlNode; -var XmlText = __nccwpck_require__(90971).XmlText; - -function XmlBuilder() { } - -XmlBuilder.prototype.toXML = function(params, shape, rootElement, noEmpty) { - var xml = new XmlNode(rootElement); - applyNamespaces(xml, shape, true); - serialize(xml, params, shape); - return xml.children.length > 0 || noEmpty ? xml.toString() : ''; -}; - -function serialize(xml, value, shape) { - switch (shape.type) { - case 'structure': return serializeStructure(xml, value, shape); - case 'map': return serializeMap(xml, value, shape); - case 'list': return serializeList(xml, value, shape); - default: return serializeScalar(xml, value, shape); - } -} - -function serializeStructure(xml, params, shape) { - util.arrayEach(shape.memberNames, function(memberName) { - var memberShape = shape.members[memberName]; - if (memberShape.location !== 'body') return; - - var value = params[memberName]; - var name = memberShape.name; - if (value !== undefined && value !== null) { - if (memberShape.isXmlAttribute) { - xml.addAttribute(name, value); - } else if (memberShape.flattened) { - serialize(xml, value, memberShape); - } else { - var element = new XmlNode(name); - xml.addChildNode(element); - applyNamespaces(element, memberShape); - serialize(element, value, memberShape); - } - } - }); -} - -function serializeMap(xml, map, shape) { - var xmlKey = shape.key.name || 'key'; - var xmlValue = shape.value.name || 'value'; - - util.each(map, function(key, value) { - var entry = new XmlNode(shape.flattened ? shape.name : 'entry'); - xml.addChildNode(entry); - - var entryKey = new XmlNode(xmlKey); - var entryValue = new XmlNode(xmlValue); - entry.addChildNode(entryKey); - entry.addChildNode(entryValue); - - serialize(entryKey, key, shape.key); - serialize(entryValue, value, shape.value); - }); -} - -function serializeList(xml, list, shape) { - if (shape.flattened) { - util.arrayEach(list, function(value) { - var name = shape.member.name || shape.name; - var element = new XmlNode(name); - xml.addChildNode(element); - serialize(element, value, shape.member); - }); - } else { - util.arrayEach(list, function(value) { - var name = shape.member.name || 'member'; - var element = new XmlNode(name); - xml.addChildNode(element); - serialize(element, value, shape.member); - }); - } -} - -function serializeScalar(xml, value, shape) { - xml.addChildNode( - new XmlText(shape.toWireFormat(value)) - ); -} - -function applyNamespaces(xml, shape, isRoot) { - var uri, prefix = 'xmlns'; - if (shape.xmlNamespaceUri) { - uri = shape.xmlNamespaceUri; - if (shape.xmlNamespacePrefix) prefix += ':' + shape.xmlNamespacePrefix; - } else if (isRoot && shape.api.xmlNamespaceUri) { - uri = shape.api.xmlNamespaceUri; - } - - if (uri) xml.addAttribute(prefix, uri); -} - -/** - * @api private - */ -module.exports = XmlBuilder; - - -/***/ }), - -/***/ 98241: -/***/ ((module) => { - -/** - * Escapes characters that can not be in an XML attribute. - */ -function escapeAttribute(value) { - return value.replace(/&/g, '&').replace(/'/g, ''').replace(//g, '>').replace(/"/g, '"'); -} - -/** - * @api private - */ -module.exports = { - escapeAttribute: escapeAttribute -}; - - -/***/ }), - -/***/ 98464: -/***/ ((module) => { - -/** - * Escapes characters that can not be in an XML element. - */ -function escapeElement(value) { - return value.replace(/&/g, '&') - .replace(//g, '>') - .replace(/\r/g, ' ') - .replace(/\n/g, ' ') - .replace(/\u0085/g, '…') - .replace(/\u2028/, '
'); -} - -/** - * @api private - */ -module.exports = { - escapeElement: escapeElement -}; - - -/***/ }), - -/***/ 96752: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var AWS = __nccwpck_require__(28437); -var util = AWS.util; -var Shape = AWS.Model.Shape; - -var xml2js = __nccwpck_require__(66189); - -/** - * @api private - */ -var options = { // options passed to xml2js parser - explicitCharkey: false, // undocumented - trim: false, // trim the leading/trailing whitespace from text nodes - normalize: false, // trim interior whitespace inside text nodes - explicitRoot: false, // return the root node in the resulting object? - emptyTag: null, // the default value for empty nodes - explicitArray: true, // always put child nodes in an array - ignoreAttrs: false, // ignore attributes, only create text nodes - mergeAttrs: false, // merge attributes and child elements - validator: null // a callable validator -}; - -function NodeXmlParser() { } - -NodeXmlParser.prototype.parse = function(xml, shape) { - shape = shape || {}; - - var result = null; - var error = null; - - var parser = new xml2js.Parser(options); - parser.parseString(xml, function (e, r) { - error = e; - result = r; - }); - - if (result) { - var data = parseXml(result, shape); - if (result.ResponseMetadata) { - data.ResponseMetadata = parseXml(result.ResponseMetadata[0], {}); - } - return data; - } else if (error) { - throw util.error(error, {code: 'XMLParserError', retryable: true}); - } else { // empty xml document - return parseXml({}, shape); - } -}; - -function parseXml(xml, shape) { - switch (shape.type) { - case 'structure': return parseStructure(xml, shape); - case 'map': return parseMap(xml, shape); - case 'list': return parseList(xml, shape); - case undefined: case null: return parseUnknown(xml); - default: return parseScalar(xml, shape); - } -} - -function parseStructure(xml, shape) { - var data = {}; - if (xml === null) return data; - - util.each(shape.members, function(memberName, memberShape) { - var xmlName = memberShape.name; - if (Object.prototype.hasOwnProperty.call(xml, xmlName) && Array.isArray(xml[xmlName])) { - var xmlChild = xml[xmlName]; - if (!memberShape.flattened) xmlChild = xmlChild[0]; - - data[memberName] = parseXml(xmlChild, memberShape); - } else if (memberShape.isXmlAttribute && - xml.$ && Object.prototype.hasOwnProperty.call(xml.$, xmlName)) { - data[memberName] = parseScalar(xml.$[xmlName], memberShape); - } else if (memberShape.type === 'list' && !shape.api.xmlNoDefaultLists) { - data[memberName] = memberShape.defaultValue; - } - }); - - return data; -} - -function parseMap(xml, shape) { - var data = {}; - if (xml === null) return data; - - var xmlKey = shape.key.name || 'key'; - var xmlValue = shape.value.name || 'value'; - var iterable = shape.flattened ? xml : xml.entry; - - if (Array.isArray(iterable)) { - util.arrayEach(iterable, function(child) { - data[child[xmlKey][0]] = parseXml(child[xmlValue][0], shape.value); - }); - } - - return data; -} - -function parseList(xml, shape) { - var data = []; - var name = shape.member.name || 'member'; - if (shape.flattened) { - util.arrayEach(xml, function(xmlChild) { - data.push(parseXml(xmlChild, shape.member)); - }); - } else if (xml && Array.isArray(xml[name])) { - util.arrayEach(xml[name], function(child) { - data.push(parseXml(child, shape.member)); - }); - } - - return data; -} - -function parseScalar(text, shape) { - if (text && text.$ && text.$.encoding === 'base64') { - shape = new Shape.create({type: text.$.encoding}); - } - if (text && text._) text = text._; - - if (typeof shape.toType === 'function') { - return shape.toType(text); - } else { - return text; - } -} - -function parseUnknown(xml) { - if (xml === undefined || xml === null) return ''; - if (typeof xml === 'string') return xml; - - // parse a list - if (Array.isArray(xml)) { - var arr = []; - for (i = 0; i < xml.length; i++) { - arr.push(parseXml(xml[i], {})); - } - return arr; - } - - // empty object - var keys = Object.keys(xml), i; - if (keys.length === 0 || (keys.length === 1 && keys[0] === '$')) { - return {}; - } - - // object, parse as structure - var data = {}; - for (i = 0; i < keys.length; i++) { - var key = keys[i], value = xml[key]; - if (key === '$') continue; - if (value.length > 1) { // this member is a list - data[key] = parseList(value, {member: {}}); - } else { // this member is a single item - data[key] = parseXml(value[0], {}); - } - } - return data; -} - -/** - * @api private - */ -module.exports = NodeXmlParser; - - -/***/ }), - -/***/ 20397: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var escapeAttribute = __nccwpck_require__(98241).escapeAttribute; - -/** - * Represents an XML node. - * @api private - */ -function XmlNode(name, children) { - if (children === void 0) { children = []; } - this.name = name; - this.children = children; - this.attributes = {}; -} -XmlNode.prototype.addAttribute = function (name, value) { - this.attributes[name] = value; - return this; -}; -XmlNode.prototype.addChildNode = function (child) { - this.children.push(child); - return this; -}; -XmlNode.prototype.removeAttribute = function (name) { - delete this.attributes[name]; - return this; -}; -XmlNode.prototype.toString = function () { - var hasChildren = Boolean(this.children.length); - var xmlText = '<' + this.name; - // add attributes - var attributes = this.attributes; - for (var i = 0, attributeNames = Object.keys(attributes); i < attributeNames.length; i++) { - var attributeName = attributeNames[i]; - var attribute = attributes[attributeName]; - if (typeof attribute !== 'undefined' && attribute !== null) { - xmlText += ' ' + attributeName + '=\"' + escapeAttribute('' + attribute) + '\"'; - } - } - return xmlText += !hasChildren ? '/>' : '>' + this.children.map(function (c) { return c.toString(); }).join('') + ''; -}; - -/** - * @api private - */ -module.exports = { - XmlNode: XmlNode -}; - - -/***/ }), - -/***/ 90971: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var escapeElement = __nccwpck_require__(98464).escapeElement; - -/** - * Represents an XML text value. - * @api private - */ -function XmlText(value) { - this.value = value; -} - -XmlText.prototype.toString = function () { - return escapeElement('' + this.value); -}; - -/** - * @api private - */ -module.exports = { - XmlText: XmlText -}; - - -/***/ }), - -/***/ 96323: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __webpack_unused_export__; -__webpack_unused_export__ = ({ value: true }); -var LRU_1 = __nccwpck_require__(77710); -var CACHE_SIZE = 1000; -/** - * Inspired node-lru-cache[https://github.com/isaacs/node-lru-cache] - */ -var EndpointCache = /** @class */ (function () { - function EndpointCache(maxSize) { - if (maxSize === void 0) { maxSize = CACHE_SIZE; } - this.maxSize = maxSize; - this.cache = new LRU_1.LRUCache(maxSize); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ECRPUBLICClient = void 0; +const config_resolver_1 = __nccwpck_require__(6153); +const middleware_content_length_1 = __nccwpck_require__(2245); +const middleware_host_header_1 = __nccwpck_require__(2545); +const middleware_logger_1 = __nccwpck_require__(14); +const middleware_retry_1 = __nccwpck_require__(6064); +const middleware_signing_1 = __nccwpck_require__(4935); +const middleware_user_agent_1 = __nccwpck_require__(4688); +const smithy_client_1 = __nccwpck_require__(4963); +const runtimeConfig_1 = __nccwpck_require__(9324); +class ECRPUBLICClient extends smithy_client_1.Client { + constructor(configuration) { + const _config_0 = runtimeConfig_1.getRuntimeConfig(configuration); + const _config_1 = config_resolver_1.resolveRegionConfig(_config_0); + const _config_2 = config_resolver_1.resolveEndpointsConfig(_config_1); + const _config_3 = middleware_retry_1.resolveRetryConfig(_config_2); + const _config_4 = middleware_host_header_1.resolveHostHeaderConfig(_config_3); + const _config_5 = middleware_signing_1.resolveAwsAuthConfig(_config_4); + const _config_6 = middleware_user_agent_1.resolveUserAgentConfig(_config_5); + super(_config_6); + this.config = _config_6; + this.middlewareStack.use(middleware_retry_1.getRetryPlugin(this.config)); + this.middlewareStack.use(middleware_content_length_1.getContentLengthPlugin(this.config)); + this.middlewareStack.use(middleware_host_header_1.getHostHeaderPlugin(this.config)); + this.middlewareStack.use(middleware_logger_1.getLoggerPlugin(this.config)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(this.config)); + this.middlewareStack.use(middleware_user_agent_1.getUserAgentPlugin(this.config)); } - ; - Object.defineProperty(EndpointCache.prototype, "size", { - get: function () { - return this.cache.length; - }, - enumerable: true, - configurable: true - }); - EndpointCache.prototype.put = function (key, value) { - var keyString = typeof key !== 'string' ? EndpointCache.getKeyString(key) : key; - var endpointRecord = this.populateValue(value); - this.cache.put(keyString, endpointRecord); - }; - EndpointCache.prototype.get = function (key) { - var keyString = typeof key !== 'string' ? EndpointCache.getKeyString(key) : key; - var now = Date.now(); - var records = this.cache.get(keyString); - if (records) { - for (var i = records.length-1; i >= 0; i--) { - var record = records[i]; - if (record.Expire < now) { - records.splice(i, 1); - } - } - if (records.length === 0) { - this.cache.remove(keyString); - return undefined; - } - } - return records; - }; - EndpointCache.getKeyString = function (key) { - var identifiers = []; - var identifierNames = Object.keys(key).sort(); - for (var i = 0; i < identifierNames.length; i++) { - var identifierName = identifierNames[i]; - if (key[identifierName] === undefined) - continue; - identifiers.push(key[identifierName]); - } - return identifiers.join(' '); - }; - EndpointCache.prototype.populateValue = function (endpoints) { - var now = Date.now(); - return endpoints.map(function (endpoint) { return ({ - Address: endpoint.Address || '', - Expire: now + (endpoint.CachePeriodInMinutes || 1) * 60 * 1000 - }); }); - }; - EndpointCache.prototype.empty = function () { - this.cache.empty(); - }; - EndpointCache.prototype.remove = function (key) { - var keyString = typeof key !== 'string' ? EndpointCache.getKeyString(key) : key; - this.cache.remove(keyString); - }; - return EndpointCache; -}()); -exports.$ = EndpointCache; + destroy() { + super.destroy(); + } +} +exports.ECRPUBLICClient = ECRPUBLICClient; + /***/ }), -/***/ 77710: +/***/ 9464: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BatchCheckLayerAvailabilityCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(8818); +const Aws_json1_1_1 = __nccwpck_require__(4170); +class BatchCheckLayerAvailabilityCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRPUBLICClient"; + const commandName = "BatchCheckLayerAvailabilityCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.BatchCheckLayerAvailabilityRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.BatchCheckLayerAvailabilityResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1BatchCheckLayerAvailabilityCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1BatchCheckLayerAvailabilityCommand(output, context); + } +} +exports.BatchCheckLayerAvailabilityCommand = BatchCheckLayerAvailabilityCommand; + + +/***/ }), + +/***/ 6517: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BatchDeleteImageCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(8818); +const Aws_json1_1_1 = __nccwpck_require__(4170); +class BatchDeleteImageCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRPUBLICClient"; + const commandName = "BatchDeleteImageCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.BatchDeleteImageRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.BatchDeleteImageResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1BatchDeleteImageCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1BatchDeleteImageCommand(output, context); + } +} +exports.BatchDeleteImageCommand = BatchDeleteImageCommand; + + +/***/ }), + +/***/ 5490: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CompleteLayerUploadCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(8818); +const Aws_json1_1_1 = __nccwpck_require__(4170); +class CompleteLayerUploadCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRPUBLICClient"; + const commandName = "CompleteLayerUploadCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CompleteLayerUploadRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CompleteLayerUploadResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1CompleteLayerUploadCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1CompleteLayerUploadCommand(output, context); + } +} +exports.CompleteLayerUploadCommand = CompleteLayerUploadCommand; + + +/***/ }), + +/***/ 9633: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateRepositoryCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(8818); +const Aws_json1_1_1 = __nccwpck_require__(4170); +class CreateRepositoryCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRPUBLICClient"; + const commandName = "CreateRepositoryCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateRepositoryRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateRepositoryResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1CreateRepositoryCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1CreateRepositoryCommand(output, context); + } +} +exports.CreateRepositoryCommand = CreateRepositoryCommand; + + +/***/ }), + +/***/ 467: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteRepositoryCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(8818); +const Aws_json1_1_1 = __nccwpck_require__(4170); +class DeleteRepositoryCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRPUBLICClient"; + const commandName = "DeleteRepositoryCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteRepositoryRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteRepositoryResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DeleteRepositoryCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DeleteRepositoryCommand(output, context); + } +} +exports.DeleteRepositoryCommand = DeleteRepositoryCommand; + + +/***/ }), + +/***/ 2528: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteRepositoryPolicyCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(8818); +const Aws_json1_1_1 = __nccwpck_require__(4170); +class DeleteRepositoryPolicyCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRPUBLICClient"; + const commandName = "DeleteRepositoryPolicyCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteRepositoryPolicyRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteRepositoryPolicyResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DeleteRepositoryPolicyCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DeleteRepositoryPolicyCommand(output, context); + } +} +exports.DeleteRepositoryPolicyCommand = DeleteRepositoryPolicyCommand; + + +/***/ }), + +/***/ 7670: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeImageTagsCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(8818); +const Aws_json1_1_1 = __nccwpck_require__(4170); +class DescribeImageTagsCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRPUBLICClient"; + const commandName = "DescribeImageTagsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeImageTagsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeImageTagsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DescribeImageTagsCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DescribeImageTagsCommand(output, context); + } +} +exports.DescribeImageTagsCommand = DescribeImageTagsCommand; + + +/***/ }), + +/***/ 2776: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeImagesCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(8818); +const Aws_json1_1_1 = __nccwpck_require__(4170); +class DescribeImagesCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRPUBLICClient"; + const commandName = "DescribeImagesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeImagesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeImagesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DescribeImagesCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DescribeImagesCommand(output, context); + } +} +exports.DescribeImagesCommand = DescribeImagesCommand; + + +/***/ }), + +/***/ 8696: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeRegistriesCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(8818); +const Aws_json1_1_1 = __nccwpck_require__(4170); +class DescribeRegistriesCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRPUBLICClient"; + const commandName = "DescribeRegistriesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeRegistriesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeRegistriesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DescribeRegistriesCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DescribeRegistriesCommand(output, context); + } +} +exports.DescribeRegistriesCommand = DescribeRegistriesCommand; + + +/***/ }), + +/***/ 2218: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeRepositoriesCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(8818); +const Aws_json1_1_1 = __nccwpck_require__(4170); +class DescribeRepositoriesCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRPUBLICClient"; + const commandName = "DescribeRepositoriesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeRepositoriesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeRepositoriesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DescribeRepositoriesCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DescribeRepositoriesCommand(output, context); + } +} +exports.DescribeRepositoriesCommand = DescribeRepositoriesCommand; + + +/***/ }), + +/***/ 2674: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetAuthorizationTokenCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(8818); +const Aws_json1_1_1 = __nccwpck_require__(4170); +class GetAuthorizationTokenCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRPUBLICClient"; + const commandName = "GetAuthorizationTokenCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetAuthorizationTokenRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetAuthorizationTokenResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetAuthorizationTokenCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetAuthorizationTokenCommand(output, context); + } +} +exports.GetAuthorizationTokenCommand = GetAuthorizationTokenCommand; + + +/***/ }), + +/***/ 6518: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetRegistryCatalogDataCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(8818); +const Aws_json1_1_1 = __nccwpck_require__(4170); +class GetRegistryCatalogDataCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRPUBLICClient"; + const commandName = "GetRegistryCatalogDataCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetRegistryCatalogDataRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetRegistryCatalogDataResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetRegistryCatalogDataCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetRegistryCatalogDataCommand(output, context); + } +} +exports.GetRegistryCatalogDataCommand = GetRegistryCatalogDataCommand; + + +/***/ }), + +/***/ 3189: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetRepositoryCatalogDataCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(8818); +const Aws_json1_1_1 = __nccwpck_require__(4170); +class GetRepositoryCatalogDataCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRPUBLICClient"; + const commandName = "GetRepositoryCatalogDataCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetRepositoryCatalogDataRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetRepositoryCatalogDataResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetRepositoryCatalogDataCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetRepositoryCatalogDataCommand(output, context); + } +} +exports.GetRepositoryCatalogDataCommand = GetRepositoryCatalogDataCommand; + + +/***/ }), + +/***/ 8562: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetRepositoryPolicyCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(8818); +const Aws_json1_1_1 = __nccwpck_require__(4170); +class GetRepositoryPolicyCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRPUBLICClient"; + const commandName = "GetRepositoryPolicyCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetRepositoryPolicyRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetRepositoryPolicyResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetRepositoryPolicyCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetRepositoryPolicyCommand(output, context); + } +} +exports.GetRepositoryPolicyCommand = GetRepositoryPolicyCommand; + + +/***/ }), + +/***/ 3675: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.InitiateLayerUploadCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(8818); +const Aws_json1_1_1 = __nccwpck_require__(4170); +class InitiateLayerUploadCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRPUBLICClient"; + const commandName = "InitiateLayerUploadCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.InitiateLayerUploadRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.InitiateLayerUploadResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1InitiateLayerUploadCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1InitiateLayerUploadCommand(output, context); + } +} +exports.InitiateLayerUploadCommand = InitiateLayerUploadCommand; + + +/***/ }), + +/***/ 575: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListTagsForResourceCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(8818); +const Aws_json1_1_1 = __nccwpck_require__(4170); +class ListTagsForResourceCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRPUBLICClient"; + const commandName = "ListTagsForResourceCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListTagsForResourceRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListTagsForResourceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1ListTagsForResourceCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1ListTagsForResourceCommand(output, context); + } +} +exports.ListTagsForResourceCommand = ListTagsForResourceCommand; + + +/***/ }), + +/***/ 6486: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PutImageCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(8818); +const Aws_json1_1_1 = __nccwpck_require__(4170); +class PutImageCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRPUBLICClient"; + const commandName = "PutImageCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.PutImageRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.PutImageResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1PutImageCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1PutImageCommand(output, context); + } +} +exports.PutImageCommand = PutImageCommand; + + +/***/ }), + +/***/ 6805: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PutRegistryCatalogDataCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(8818); +const Aws_json1_1_1 = __nccwpck_require__(4170); +class PutRegistryCatalogDataCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRPUBLICClient"; + const commandName = "PutRegistryCatalogDataCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.PutRegistryCatalogDataRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.PutRegistryCatalogDataResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1PutRegistryCatalogDataCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1PutRegistryCatalogDataCommand(output, context); + } +} +exports.PutRegistryCatalogDataCommand = PutRegistryCatalogDataCommand; + + +/***/ }), + +/***/ 3753: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PutRepositoryCatalogDataCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(8818); +const Aws_json1_1_1 = __nccwpck_require__(4170); +class PutRepositoryCatalogDataCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRPUBLICClient"; + const commandName = "PutRepositoryCatalogDataCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.PutRepositoryCatalogDataRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.PutRepositoryCatalogDataResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1PutRepositoryCatalogDataCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1PutRepositoryCatalogDataCommand(output, context); + } +} +exports.PutRepositoryCatalogDataCommand = PutRepositoryCatalogDataCommand; + + +/***/ }), + +/***/ 1796: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SetRepositoryPolicyCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(8818); +const Aws_json1_1_1 = __nccwpck_require__(4170); +class SetRepositoryPolicyCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRPUBLICClient"; + const commandName = "SetRepositoryPolicyCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.SetRepositoryPolicyRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.SetRepositoryPolicyResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1SetRepositoryPolicyCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1SetRepositoryPolicyCommand(output, context); + } +} +exports.SetRepositoryPolicyCommand = SetRepositoryPolicyCommand; + + +/***/ }), + +/***/ 9869: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TagResourceCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(8818); +const Aws_json1_1_1 = __nccwpck_require__(4170); +class TagResourceCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRPUBLICClient"; + const commandName = "TagResourceCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.TagResourceRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.TagResourceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1TagResourceCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1TagResourceCommand(output, context); + } +} +exports.TagResourceCommand = TagResourceCommand; + + +/***/ }), + +/***/ 6689: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UntagResourceCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(8818); +const Aws_json1_1_1 = __nccwpck_require__(4170); +class UntagResourceCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRPUBLICClient"; + const commandName = "UntagResourceCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.UntagResourceRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.UntagResourceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1UntagResourceCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1UntagResourceCommand(output, context); + } +} +exports.UntagResourceCommand = UntagResourceCommand; + + +/***/ }), + +/***/ 7429: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UploadLayerPartCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(8818); +const Aws_json1_1_1 = __nccwpck_require__(4170); +class UploadLayerPartCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRPUBLICClient"; + const commandName = "UploadLayerPartCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.UploadLayerPartRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.UploadLayerPartResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1UploadLayerPartCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1UploadLayerPartCommand(output, context); + } +} +exports.UploadLayerPartCommand = UploadLayerPartCommand; + + +/***/ }), + +/***/ 5442: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(9464), exports); +tslib_1.__exportStar(__nccwpck_require__(6517), exports); +tslib_1.__exportStar(__nccwpck_require__(5490), exports); +tslib_1.__exportStar(__nccwpck_require__(9633), exports); +tslib_1.__exportStar(__nccwpck_require__(467), exports); +tslib_1.__exportStar(__nccwpck_require__(2528), exports); +tslib_1.__exportStar(__nccwpck_require__(7670), exports); +tslib_1.__exportStar(__nccwpck_require__(2776), exports); +tslib_1.__exportStar(__nccwpck_require__(8696), exports); +tslib_1.__exportStar(__nccwpck_require__(2218), exports); +tslib_1.__exportStar(__nccwpck_require__(2674), exports); +tslib_1.__exportStar(__nccwpck_require__(6518), exports); +tslib_1.__exportStar(__nccwpck_require__(3189), exports); +tslib_1.__exportStar(__nccwpck_require__(8562), exports); +tslib_1.__exportStar(__nccwpck_require__(3675), exports); +tslib_1.__exportStar(__nccwpck_require__(575), exports); +tslib_1.__exportStar(__nccwpck_require__(6486), exports); +tslib_1.__exportStar(__nccwpck_require__(6805), exports); +tslib_1.__exportStar(__nccwpck_require__(3753), exports); +tslib_1.__exportStar(__nccwpck_require__(1796), exports); +tslib_1.__exportStar(__nccwpck_require__(9869), exports); +tslib_1.__exportStar(__nccwpck_require__(6689), exports); +tslib_1.__exportStar(__nccwpck_require__(7429), exports); + + +/***/ }), + +/***/ 8593: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultRegionInfoProvider = void 0; +const config_resolver_1 = __nccwpck_require__(6153); +const regionHash = {}; +const partitionHash = { + aws: { + regions: [ + "af-south-1", + "ap-east-1", + "ap-northeast-1", + "ap-northeast-2", + "ap-northeast-3", + "ap-south-1", + "ap-southeast-1", + "ap-southeast-2", + "ca-central-1", + "eu-central-1", + "eu-north-1", + "eu-south-1", + "eu-west-1", + "eu-west-2", + "eu-west-3", + "me-south-1", + "sa-east-1", + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2", + ], + regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "api.ecr-public.{region}.amazonaws.com", + tags: [], + }, + { + hostname: "api.ecr-public-fips.{region}.amazonaws.com", + tags: ["fips"], + }, + { + hostname: "api.ecr-public-fips.{region}.api.aws", + tags: ["dualstack", "fips"], + }, + { + hostname: "api.ecr-public.{region}.api.aws", + tags: ["dualstack"], + }, + ], + }, + "aws-cn": { + regions: ["cn-north-1", "cn-northwest-1"], + regionRegex: "^cn\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "api.ecr-public.{region}.amazonaws.com.cn", + tags: [], + }, + { + hostname: "api.ecr-public-fips.{region}.amazonaws.com.cn", + tags: ["fips"], + }, + { + hostname: "api.ecr-public-fips.{region}.api.amazonwebservices.com.cn", + tags: ["dualstack", "fips"], + }, + { + hostname: "api.ecr-public.{region}.api.amazonwebservices.com.cn", + tags: ["dualstack"], + }, + ], + }, + "aws-iso": { + regions: ["us-iso-east-1", "us-iso-west-1"], + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "api.ecr-public.{region}.c2s.ic.gov", + tags: [], + }, + { + hostname: "api.ecr-public-fips.{region}.c2s.ic.gov", + tags: ["fips"], + }, + ], + }, + "aws-iso-b": { + regions: ["us-isob-east-1"], + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "api.ecr-public.{region}.sc2s.sgov.gov", + tags: [], + }, + { + hostname: "api.ecr-public-fips.{region}.sc2s.sgov.gov", + tags: ["fips"], + }, + ], + }, + "aws-us-gov": { + regions: ["us-gov-east-1", "us-gov-west-1"], + regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "api.ecr-public.{region}.amazonaws.com", + tags: [], + }, + { + hostname: "api.ecr-public-fips.{region}.amazonaws.com", + tags: ["fips"], + }, + { + hostname: "api.ecr-public-fips.{region}.api.aws", + tags: ["dualstack", "fips"], + }, + { + hostname: "api.ecr-public.{region}.api.aws", + tags: ["dualstack"], + }, + ], + }, +}; +const defaultRegionInfoProvider = async (region, options) => config_resolver_1.getRegionInfo(region, { + ...options, + signingService: "ecr-public", + regionHash, + partitionHash, +}); +exports.defaultRegionInfoProvider = defaultRegionInfoProvider; + + +/***/ }), + +/***/ 2308: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(6087), exports); +tslib_1.__exportStar(__nccwpck_require__(608), exports); +tslib_1.__exportStar(__nccwpck_require__(5442), exports); +tslib_1.__exportStar(__nccwpck_require__(183), exports); +tslib_1.__exportStar(__nccwpck_require__(5945), exports); + + +/***/ }), + +/***/ 183: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(8818), exports); + + +/***/ }), + +/***/ 8818: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -var LinkedListNode = /** @class */ (function () { - function LinkedListNode(key, value) { - this.key = key; - this.value = value; - } - return LinkedListNode; -}()); -var LRUCache = /** @class */ (function () { - function LRUCache(size) { - this.nodeMap = {}; - this.size = 0; - if (typeof size !== 'number' || size < 1) { - throw new Error('Cache size can only be positive number'); - } - this.sizeLimit = size; - } - Object.defineProperty(LRUCache.prototype, "length", { - get: function () { - return this.size; - }, - enumerable: true, - configurable: true +exports.RegistryAliasStatus = exports.DescribeRegistriesRequest = exports.DescribeImageTagsResponse = exports.ImageTagDetail = exports.ReferencedImageDetail = exports.DescribeImageTagsRequest = exports.ImageNotFoundException = exports.DescribeImagesResponse = exports.ImageDetail = exports.DescribeImagesRequest = exports.RepositoryPolicyNotFoundException = exports.DeleteRepositoryPolicyResponse = exports.DeleteRepositoryPolicyRequest = exports.RepositoryNotEmptyException = exports.DeleteRepositoryResponse = exports.DeleteRepositoryRequest = exports.TooManyTagsException = exports.RepositoryAlreadyExistsException = exports.LimitExceededException = exports.InvalidTagParameterException = exports.CreateRepositoryResponse = exports.Repository = exports.RepositoryCatalogData = exports.CreateRepositoryRequest = exports.Tag = exports.RepositoryCatalogDataInput = exports.UploadNotFoundException = exports.UnsupportedCommandException = exports.LayerPartTooSmallException = exports.LayerAlreadyExistsException = exports.InvalidLayerException = exports.EmptyUploadException = exports.CompleteLayerUploadResponse = exports.CompleteLayerUploadRequest = exports.BatchDeleteImageResponse = exports.ImageFailure = exports.ImageFailureCode = exports.BatchDeleteImageRequest = exports.ImageIdentifier = exports.ServerException = exports.RepositoryNotFoundException = exports.RegistryNotFoundException = exports.InvalidParameterException = exports.BatchCheckLayerAvailabilityResponse = exports.Layer = exports.LayerAvailability = exports.LayerFailure = exports.LayerFailureCode = exports.BatchCheckLayerAvailabilityRequest = exports.AuthorizationData = void 0; +exports.UploadLayerPartResponse = exports.UploadLayerPartRequest = exports.UntagResourceResponse = exports.UntagResourceRequest = exports.TagResourceResponse = exports.TagResourceRequest = exports.SetRepositoryPolicyResponse = exports.SetRepositoryPolicyRequest = exports.PutRepositoryCatalogDataResponse = exports.PutRepositoryCatalogDataRequest = exports.PutRegistryCatalogDataResponse = exports.PutRegistryCatalogDataRequest = exports.ReferencedImagesNotFoundException = exports.PutImageResponse = exports.PutImageRequest = exports.ListTagsForResourceResponse = exports.ListTagsForResourceRequest = exports.LayersNotFoundException = exports.InvalidLayerPartException = exports.InitiateLayerUploadResponse = exports.InitiateLayerUploadRequest = exports.ImageTagAlreadyExistsException = exports.ImageDigestDoesNotMatchException = exports.ImageAlreadyExistsException = exports.Image = exports.GetRepositoryPolicyResponse = exports.GetRepositoryPolicyRequest = exports.GetRepositoryCatalogDataResponse = exports.GetRepositoryCatalogDataRequest = exports.GetRegistryCatalogDataResponse = exports.RegistryCatalogData = exports.GetRegistryCatalogDataRequest = exports.GetAuthorizationTokenResponse = exports.GetAuthorizationTokenRequest = exports.DescribeRepositoriesResponse = exports.DescribeRepositoriesRequest = exports.DescribeRegistriesResponse = exports.Registry = exports.RegistryAlias = void 0; +var AuthorizationData; +(function (AuthorizationData) { + AuthorizationData.filterSensitiveLog = (obj) => ({ + ...obj, }); - LRUCache.prototype.prependToList = function (node) { - if (!this.headerNode) { - this.tailNode = node; +})(AuthorizationData = exports.AuthorizationData || (exports.AuthorizationData = {})); +var BatchCheckLayerAvailabilityRequest; +(function (BatchCheckLayerAvailabilityRequest) { + BatchCheckLayerAvailabilityRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(BatchCheckLayerAvailabilityRequest = exports.BatchCheckLayerAvailabilityRequest || (exports.BatchCheckLayerAvailabilityRequest = {})); +var LayerFailureCode; +(function (LayerFailureCode) { + LayerFailureCode["InvalidLayerDigest"] = "InvalidLayerDigest"; + LayerFailureCode["MissingLayerDigest"] = "MissingLayerDigest"; +})(LayerFailureCode = exports.LayerFailureCode || (exports.LayerFailureCode = {})); +var LayerFailure; +(function (LayerFailure) { + LayerFailure.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LayerFailure = exports.LayerFailure || (exports.LayerFailure = {})); +var LayerAvailability; +(function (LayerAvailability) { + LayerAvailability["AVAILABLE"] = "AVAILABLE"; + LayerAvailability["UNAVAILABLE"] = "UNAVAILABLE"; +})(LayerAvailability = exports.LayerAvailability || (exports.LayerAvailability = {})); +var Layer; +(function (Layer) { + Layer.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Layer = exports.Layer || (exports.Layer = {})); +var BatchCheckLayerAvailabilityResponse; +(function (BatchCheckLayerAvailabilityResponse) { + BatchCheckLayerAvailabilityResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(BatchCheckLayerAvailabilityResponse = exports.BatchCheckLayerAvailabilityResponse || (exports.BatchCheckLayerAvailabilityResponse = {})); +var InvalidParameterException; +(function (InvalidParameterException) { + InvalidParameterException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidParameterException = exports.InvalidParameterException || (exports.InvalidParameterException = {})); +var RegistryNotFoundException; +(function (RegistryNotFoundException) { + RegistryNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RegistryNotFoundException = exports.RegistryNotFoundException || (exports.RegistryNotFoundException = {})); +var RepositoryNotFoundException; +(function (RepositoryNotFoundException) { + RepositoryNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RepositoryNotFoundException = exports.RepositoryNotFoundException || (exports.RepositoryNotFoundException = {})); +var ServerException; +(function (ServerException) { + ServerException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ServerException = exports.ServerException || (exports.ServerException = {})); +var ImageIdentifier; +(function (ImageIdentifier) { + ImageIdentifier.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ImageIdentifier = exports.ImageIdentifier || (exports.ImageIdentifier = {})); +var BatchDeleteImageRequest; +(function (BatchDeleteImageRequest) { + BatchDeleteImageRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(BatchDeleteImageRequest = exports.BatchDeleteImageRequest || (exports.BatchDeleteImageRequest = {})); +var ImageFailureCode; +(function (ImageFailureCode) { + ImageFailureCode["ImageNotFound"] = "ImageNotFound"; + ImageFailureCode["ImageReferencedByManifestList"] = "ImageReferencedByManifestList"; + ImageFailureCode["ImageTagDoesNotMatchDigest"] = "ImageTagDoesNotMatchDigest"; + ImageFailureCode["InvalidImageDigest"] = "InvalidImageDigest"; + ImageFailureCode["InvalidImageTag"] = "InvalidImageTag"; + ImageFailureCode["KmsError"] = "KmsError"; + ImageFailureCode["MissingDigestAndTag"] = "MissingDigestAndTag"; +})(ImageFailureCode = exports.ImageFailureCode || (exports.ImageFailureCode = {})); +var ImageFailure; +(function (ImageFailure) { + ImageFailure.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ImageFailure = exports.ImageFailure || (exports.ImageFailure = {})); +var BatchDeleteImageResponse; +(function (BatchDeleteImageResponse) { + BatchDeleteImageResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(BatchDeleteImageResponse = exports.BatchDeleteImageResponse || (exports.BatchDeleteImageResponse = {})); +var CompleteLayerUploadRequest; +(function (CompleteLayerUploadRequest) { + CompleteLayerUploadRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CompleteLayerUploadRequest = exports.CompleteLayerUploadRequest || (exports.CompleteLayerUploadRequest = {})); +var CompleteLayerUploadResponse; +(function (CompleteLayerUploadResponse) { + CompleteLayerUploadResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CompleteLayerUploadResponse = exports.CompleteLayerUploadResponse || (exports.CompleteLayerUploadResponse = {})); +var EmptyUploadException; +(function (EmptyUploadException) { + EmptyUploadException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(EmptyUploadException = exports.EmptyUploadException || (exports.EmptyUploadException = {})); +var InvalidLayerException; +(function (InvalidLayerException) { + InvalidLayerException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidLayerException = exports.InvalidLayerException || (exports.InvalidLayerException = {})); +var LayerAlreadyExistsException; +(function (LayerAlreadyExistsException) { + LayerAlreadyExistsException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LayerAlreadyExistsException = exports.LayerAlreadyExistsException || (exports.LayerAlreadyExistsException = {})); +var LayerPartTooSmallException; +(function (LayerPartTooSmallException) { + LayerPartTooSmallException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LayerPartTooSmallException = exports.LayerPartTooSmallException || (exports.LayerPartTooSmallException = {})); +var UnsupportedCommandException; +(function (UnsupportedCommandException) { + UnsupportedCommandException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UnsupportedCommandException = exports.UnsupportedCommandException || (exports.UnsupportedCommandException = {})); +var UploadNotFoundException; +(function (UploadNotFoundException) { + UploadNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UploadNotFoundException = exports.UploadNotFoundException || (exports.UploadNotFoundException = {})); +var RepositoryCatalogDataInput; +(function (RepositoryCatalogDataInput) { + RepositoryCatalogDataInput.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RepositoryCatalogDataInput = exports.RepositoryCatalogDataInput || (exports.RepositoryCatalogDataInput = {})); +var Tag; +(function (Tag) { + Tag.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Tag = exports.Tag || (exports.Tag = {})); +var CreateRepositoryRequest; +(function (CreateRepositoryRequest) { + CreateRepositoryRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateRepositoryRequest = exports.CreateRepositoryRequest || (exports.CreateRepositoryRequest = {})); +var RepositoryCatalogData; +(function (RepositoryCatalogData) { + RepositoryCatalogData.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RepositoryCatalogData = exports.RepositoryCatalogData || (exports.RepositoryCatalogData = {})); +var Repository; +(function (Repository) { + Repository.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Repository = exports.Repository || (exports.Repository = {})); +var CreateRepositoryResponse; +(function (CreateRepositoryResponse) { + CreateRepositoryResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateRepositoryResponse = exports.CreateRepositoryResponse || (exports.CreateRepositoryResponse = {})); +var InvalidTagParameterException; +(function (InvalidTagParameterException) { + InvalidTagParameterException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidTagParameterException = exports.InvalidTagParameterException || (exports.InvalidTagParameterException = {})); +var LimitExceededException; +(function (LimitExceededException) { + LimitExceededException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LimitExceededException = exports.LimitExceededException || (exports.LimitExceededException = {})); +var RepositoryAlreadyExistsException; +(function (RepositoryAlreadyExistsException) { + RepositoryAlreadyExistsException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RepositoryAlreadyExistsException = exports.RepositoryAlreadyExistsException || (exports.RepositoryAlreadyExistsException = {})); +var TooManyTagsException; +(function (TooManyTagsException) { + TooManyTagsException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TooManyTagsException = exports.TooManyTagsException || (exports.TooManyTagsException = {})); +var DeleteRepositoryRequest; +(function (DeleteRepositoryRequest) { + DeleteRepositoryRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteRepositoryRequest = exports.DeleteRepositoryRequest || (exports.DeleteRepositoryRequest = {})); +var DeleteRepositoryResponse; +(function (DeleteRepositoryResponse) { + DeleteRepositoryResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteRepositoryResponse = exports.DeleteRepositoryResponse || (exports.DeleteRepositoryResponse = {})); +var RepositoryNotEmptyException; +(function (RepositoryNotEmptyException) { + RepositoryNotEmptyException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RepositoryNotEmptyException = exports.RepositoryNotEmptyException || (exports.RepositoryNotEmptyException = {})); +var DeleteRepositoryPolicyRequest; +(function (DeleteRepositoryPolicyRequest) { + DeleteRepositoryPolicyRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteRepositoryPolicyRequest = exports.DeleteRepositoryPolicyRequest || (exports.DeleteRepositoryPolicyRequest = {})); +var DeleteRepositoryPolicyResponse; +(function (DeleteRepositoryPolicyResponse) { + DeleteRepositoryPolicyResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteRepositoryPolicyResponse = exports.DeleteRepositoryPolicyResponse || (exports.DeleteRepositoryPolicyResponse = {})); +var RepositoryPolicyNotFoundException; +(function (RepositoryPolicyNotFoundException) { + RepositoryPolicyNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RepositoryPolicyNotFoundException = exports.RepositoryPolicyNotFoundException || (exports.RepositoryPolicyNotFoundException = {})); +var DescribeImagesRequest; +(function (DescribeImagesRequest) { + DescribeImagesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeImagesRequest = exports.DescribeImagesRequest || (exports.DescribeImagesRequest = {})); +var ImageDetail; +(function (ImageDetail) { + ImageDetail.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ImageDetail = exports.ImageDetail || (exports.ImageDetail = {})); +var DescribeImagesResponse; +(function (DescribeImagesResponse) { + DescribeImagesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeImagesResponse = exports.DescribeImagesResponse || (exports.DescribeImagesResponse = {})); +var ImageNotFoundException; +(function (ImageNotFoundException) { + ImageNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ImageNotFoundException = exports.ImageNotFoundException || (exports.ImageNotFoundException = {})); +var DescribeImageTagsRequest; +(function (DescribeImageTagsRequest) { + DescribeImageTagsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeImageTagsRequest = exports.DescribeImageTagsRequest || (exports.DescribeImageTagsRequest = {})); +var ReferencedImageDetail; +(function (ReferencedImageDetail) { + ReferencedImageDetail.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ReferencedImageDetail = exports.ReferencedImageDetail || (exports.ReferencedImageDetail = {})); +var ImageTagDetail; +(function (ImageTagDetail) { + ImageTagDetail.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ImageTagDetail = exports.ImageTagDetail || (exports.ImageTagDetail = {})); +var DescribeImageTagsResponse; +(function (DescribeImageTagsResponse) { + DescribeImageTagsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeImageTagsResponse = exports.DescribeImageTagsResponse || (exports.DescribeImageTagsResponse = {})); +var DescribeRegistriesRequest; +(function (DescribeRegistriesRequest) { + DescribeRegistriesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeRegistriesRequest = exports.DescribeRegistriesRequest || (exports.DescribeRegistriesRequest = {})); +var RegistryAliasStatus; +(function (RegistryAliasStatus) { + RegistryAliasStatus["ACTIVE"] = "ACTIVE"; + RegistryAliasStatus["PENDING"] = "PENDING"; + RegistryAliasStatus["REJECTED"] = "REJECTED"; +})(RegistryAliasStatus = exports.RegistryAliasStatus || (exports.RegistryAliasStatus = {})); +var RegistryAlias; +(function (RegistryAlias) { + RegistryAlias.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RegistryAlias = exports.RegistryAlias || (exports.RegistryAlias = {})); +var Registry; +(function (Registry) { + Registry.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Registry = exports.Registry || (exports.Registry = {})); +var DescribeRegistriesResponse; +(function (DescribeRegistriesResponse) { + DescribeRegistriesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeRegistriesResponse = exports.DescribeRegistriesResponse || (exports.DescribeRegistriesResponse = {})); +var DescribeRepositoriesRequest; +(function (DescribeRepositoriesRequest) { + DescribeRepositoriesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeRepositoriesRequest = exports.DescribeRepositoriesRequest || (exports.DescribeRepositoriesRequest = {})); +var DescribeRepositoriesResponse; +(function (DescribeRepositoriesResponse) { + DescribeRepositoriesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeRepositoriesResponse = exports.DescribeRepositoriesResponse || (exports.DescribeRepositoriesResponse = {})); +var GetAuthorizationTokenRequest; +(function (GetAuthorizationTokenRequest) { + GetAuthorizationTokenRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetAuthorizationTokenRequest = exports.GetAuthorizationTokenRequest || (exports.GetAuthorizationTokenRequest = {})); +var GetAuthorizationTokenResponse; +(function (GetAuthorizationTokenResponse) { + GetAuthorizationTokenResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetAuthorizationTokenResponse = exports.GetAuthorizationTokenResponse || (exports.GetAuthorizationTokenResponse = {})); +var GetRegistryCatalogDataRequest; +(function (GetRegistryCatalogDataRequest) { + GetRegistryCatalogDataRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetRegistryCatalogDataRequest = exports.GetRegistryCatalogDataRequest || (exports.GetRegistryCatalogDataRequest = {})); +var RegistryCatalogData; +(function (RegistryCatalogData) { + RegistryCatalogData.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RegistryCatalogData = exports.RegistryCatalogData || (exports.RegistryCatalogData = {})); +var GetRegistryCatalogDataResponse; +(function (GetRegistryCatalogDataResponse) { + GetRegistryCatalogDataResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetRegistryCatalogDataResponse = exports.GetRegistryCatalogDataResponse || (exports.GetRegistryCatalogDataResponse = {})); +var GetRepositoryCatalogDataRequest; +(function (GetRepositoryCatalogDataRequest) { + GetRepositoryCatalogDataRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetRepositoryCatalogDataRequest = exports.GetRepositoryCatalogDataRequest || (exports.GetRepositoryCatalogDataRequest = {})); +var GetRepositoryCatalogDataResponse; +(function (GetRepositoryCatalogDataResponse) { + GetRepositoryCatalogDataResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetRepositoryCatalogDataResponse = exports.GetRepositoryCatalogDataResponse || (exports.GetRepositoryCatalogDataResponse = {})); +var GetRepositoryPolicyRequest; +(function (GetRepositoryPolicyRequest) { + GetRepositoryPolicyRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetRepositoryPolicyRequest = exports.GetRepositoryPolicyRequest || (exports.GetRepositoryPolicyRequest = {})); +var GetRepositoryPolicyResponse; +(function (GetRepositoryPolicyResponse) { + GetRepositoryPolicyResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetRepositoryPolicyResponse = exports.GetRepositoryPolicyResponse || (exports.GetRepositoryPolicyResponse = {})); +var Image; +(function (Image) { + Image.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Image = exports.Image || (exports.Image = {})); +var ImageAlreadyExistsException; +(function (ImageAlreadyExistsException) { + ImageAlreadyExistsException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ImageAlreadyExistsException = exports.ImageAlreadyExistsException || (exports.ImageAlreadyExistsException = {})); +var ImageDigestDoesNotMatchException; +(function (ImageDigestDoesNotMatchException) { + ImageDigestDoesNotMatchException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ImageDigestDoesNotMatchException = exports.ImageDigestDoesNotMatchException || (exports.ImageDigestDoesNotMatchException = {})); +var ImageTagAlreadyExistsException; +(function (ImageTagAlreadyExistsException) { + ImageTagAlreadyExistsException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ImageTagAlreadyExistsException = exports.ImageTagAlreadyExistsException || (exports.ImageTagAlreadyExistsException = {})); +var InitiateLayerUploadRequest; +(function (InitiateLayerUploadRequest) { + InitiateLayerUploadRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InitiateLayerUploadRequest = exports.InitiateLayerUploadRequest || (exports.InitiateLayerUploadRequest = {})); +var InitiateLayerUploadResponse; +(function (InitiateLayerUploadResponse) { + InitiateLayerUploadResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InitiateLayerUploadResponse = exports.InitiateLayerUploadResponse || (exports.InitiateLayerUploadResponse = {})); +var InvalidLayerPartException; +(function (InvalidLayerPartException) { + InvalidLayerPartException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidLayerPartException = exports.InvalidLayerPartException || (exports.InvalidLayerPartException = {})); +var LayersNotFoundException; +(function (LayersNotFoundException) { + LayersNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LayersNotFoundException = exports.LayersNotFoundException || (exports.LayersNotFoundException = {})); +var ListTagsForResourceRequest; +(function (ListTagsForResourceRequest) { + ListTagsForResourceRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListTagsForResourceRequest = exports.ListTagsForResourceRequest || (exports.ListTagsForResourceRequest = {})); +var ListTagsForResourceResponse; +(function (ListTagsForResourceResponse) { + ListTagsForResourceResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListTagsForResourceResponse = exports.ListTagsForResourceResponse || (exports.ListTagsForResourceResponse = {})); +var PutImageRequest; +(function (PutImageRequest) { + PutImageRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PutImageRequest = exports.PutImageRequest || (exports.PutImageRequest = {})); +var PutImageResponse; +(function (PutImageResponse) { + PutImageResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PutImageResponse = exports.PutImageResponse || (exports.PutImageResponse = {})); +var ReferencedImagesNotFoundException; +(function (ReferencedImagesNotFoundException) { + ReferencedImagesNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ReferencedImagesNotFoundException = exports.ReferencedImagesNotFoundException || (exports.ReferencedImagesNotFoundException = {})); +var PutRegistryCatalogDataRequest; +(function (PutRegistryCatalogDataRequest) { + PutRegistryCatalogDataRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PutRegistryCatalogDataRequest = exports.PutRegistryCatalogDataRequest || (exports.PutRegistryCatalogDataRequest = {})); +var PutRegistryCatalogDataResponse; +(function (PutRegistryCatalogDataResponse) { + PutRegistryCatalogDataResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PutRegistryCatalogDataResponse = exports.PutRegistryCatalogDataResponse || (exports.PutRegistryCatalogDataResponse = {})); +var PutRepositoryCatalogDataRequest; +(function (PutRepositoryCatalogDataRequest) { + PutRepositoryCatalogDataRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PutRepositoryCatalogDataRequest = exports.PutRepositoryCatalogDataRequest || (exports.PutRepositoryCatalogDataRequest = {})); +var PutRepositoryCatalogDataResponse; +(function (PutRepositoryCatalogDataResponse) { + PutRepositoryCatalogDataResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PutRepositoryCatalogDataResponse = exports.PutRepositoryCatalogDataResponse || (exports.PutRepositoryCatalogDataResponse = {})); +var SetRepositoryPolicyRequest; +(function (SetRepositoryPolicyRequest) { + SetRepositoryPolicyRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SetRepositoryPolicyRequest = exports.SetRepositoryPolicyRequest || (exports.SetRepositoryPolicyRequest = {})); +var SetRepositoryPolicyResponse; +(function (SetRepositoryPolicyResponse) { + SetRepositoryPolicyResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SetRepositoryPolicyResponse = exports.SetRepositoryPolicyResponse || (exports.SetRepositoryPolicyResponse = {})); +var TagResourceRequest; +(function (TagResourceRequest) { + TagResourceRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TagResourceRequest = exports.TagResourceRequest || (exports.TagResourceRequest = {})); +var TagResourceResponse; +(function (TagResourceResponse) { + TagResourceResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TagResourceResponse = exports.TagResourceResponse || (exports.TagResourceResponse = {})); +var UntagResourceRequest; +(function (UntagResourceRequest) { + UntagResourceRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UntagResourceRequest = exports.UntagResourceRequest || (exports.UntagResourceRequest = {})); +var UntagResourceResponse; +(function (UntagResourceResponse) { + UntagResourceResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UntagResourceResponse = exports.UntagResourceResponse || (exports.UntagResourceResponse = {})); +var UploadLayerPartRequest; +(function (UploadLayerPartRequest) { + UploadLayerPartRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UploadLayerPartRequest = exports.UploadLayerPartRequest || (exports.UploadLayerPartRequest = {})); +var UploadLayerPartResponse; +(function (UploadLayerPartResponse) { + UploadLayerPartResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UploadLayerPartResponse = exports.UploadLayerPartResponse || (exports.UploadLayerPartResponse = {})); + + +/***/ }), + +/***/ 9634: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateDescribeImageTags = void 0; +const DescribeImageTagsCommand_1 = __nccwpck_require__(7670); +const ECRPUBLIC_1 = __nccwpck_require__(6087); +const ECRPUBLICClient_1 = __nccwpck_require__(608); +const makePagedClientRequest = async (client, input, ...args) => { + return await client.send(new DescribeImageTagsCommand_1.DescribeImageTagsCommand(input), ...args); +}; +const makePagedRequest = async (client, input, ...args) => { + return await client.describeImageTags(input, ...args); +}; +async function* paginateDescribeImageTags(config, input, ...additionalArguments) { + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof ECRPUBLIC_1.ECRPUBLIC) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof ECRPUBLICClient_1.ECRPUBLICClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); } else { - this.headerNode.prev = node; - node.next = this.headerNode; + throw new Error("Invalid client, expected ECRPUBLIC | ECRPUBLICClient"); } - this.headerNode = node; - this.size++; - }; - LRUCache.prototype.removeFromTail = function () { - if (!this.tailNode) { - return undefined; - } - var node = this.tailNode; - var prevNode = node.prev; - if (prevNode) { - prevNode.next = undefined; - } - node.prev = undefined; - this.tailNode = prevNode; - this.size--; - return node; - }; - LRUCache.prototype.detachFromList = function (node) { - if (this.headerNode === node) { - this.headerNode = node.next; - } - if (this.tailNode === node) { - this.tailNode = node.prev; - } - if (node.prev) { - node.prev.next = node.next; - } - if (node.next) { - node.next.prev = node.prev; - } - node.next = undefined; - node.prev = undefined; - this.size--; - }; - LRUCache.prototype.get = function (key) { - if (this.nodeMap[key]) { - var node = this.nodeMap[key]; - this.detachFromList(node); - this.prependToList(node); - return node.value; - } - }; - LRUCache.prototype.remove = function (key) { - if (this.nodeMap[key]) { - var node = this.nodeMap[key]; - this.detachFromList(node); - delete this.nodeMap[key]; - } - }; - LRUCache.prototype.put = function (key, value) { - if (this.nodeMap[key]) { - this.remove(key); - } - else if (this.size === this.sizeLimit) { - var tailNode = this.removeFromTail(); - var key_1 = tailNode.key; - delete this.nodeMap[key_1]; - } - var newNode = new LinkedListNode(key, value); - this.nodeMap[key] = newNode; - this.prependToList(newNode); - }; - LRUCache.prototype.empty = function () { - var keys = Object.keys(this.nodeMap); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var node = this.nodeMap[key]; - this.detachFromList(node); - delete this.nodeMap[key]; - } - }; - return LRUCache; -}()); -exports.LRUCache = LRUCache; + yield page; + token = page.nextToken; + hasNext = !!token; + } + return undefined; +} +exports.paginateDescribeImageTags = paginateDescribeImageTags; + /***/ }), -/***/ 87783: +/***/ 4128: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateDescribeImages = void 0; +const DescribeImagesCommand_1 = __nccwpck_require__(2776); +const ECRPUBLIC_1 = __nccwpck_require__(6087); +const ECRPUBLICClient_1 = __nccwpck_require__(608); +const makePagedClientRequest = async (client, input, ...args) => { + return await client.send(new DescribeImagesCommand_1.DescribeImagesCommand(input), ...args); +}; +const makePagedRequest = async (client, input, ...args) => { + return await client.describeImages(input, ...args); +}; +async function* paginateDescribeImages(config, input, ...additionalArguments) { + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof ECRPUBLIC_1.ECRPUBLIC) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof ECRPUBLICClient_1.ECRPUBLICClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected ECRPUBLIC | ECRPUBLICClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + return undefined; +} +exports.paginateDescribeImages = paginateDescribeImages; + + +/***/ }), + +/***/ 1720: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateDescribeRegistries = void 0; +const DescribeRegistriesCommand_1 = __nccwpck_require__(8696); +const ECRPUBLIC_1 = __nccwpck_require__(6087); +const ECRPUBLICClient_1 = __nccwpck_require__(608); +const makePagedClientRequest = async (client, input, ...args) => { + return await client.send(new DescribeRegistriesCommand_1.DescribeRegistriesCommand(input), ...args); +}; +const makePagedRequest = async (client, input, ...args) => { + return await client.describeRegistries(input, ...args); +}; +async function* paginateDescribeRegistries(config, input, ...additionalArguments) { + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof ECRPUBLIC_1.ECRPUBLIC) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof ECRPUBLICClient_1.ECRPUBLICClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected ECRPUBLIC | ECRPUBLICClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + return undefined; +} +exports.paginateDescribeRegistries = paginateDescribeRegistries; + + +/***/ }), + +/***/ 5474: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateDescribeRepositories = void 0; +const DescribeRepositoriesCommand_1 = __nccwpck_require__(2218); +const ECRPUBLIC_1 = __nccwpck_require__(6087); +const ECRPUBLICClient_1 = __nccwpck_require__(608); +const makePagedClientRequest = async (client, input, ...args) => { + return await client.send(new DescribeRepositoriesCommand_1.DescribeRepositoriesCommand(input), ...args); +}; +const makePagedRequest = async (client, input, ...args) => { + return await client.describeRepositories(input, ...args); +}; +async function* paginateDescribeRepositories(config, input, ...additionalArguments) { + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof ECRPUBLIC_1.ECRPUBLIC) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof ECRPUBLICClient_1.ECRPUBLICClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected ECRPUBLIC | ECRPUBLICClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + return undefined; +} +exports.paginateDescribeRepositories = paginateDescribeRepositories; + + +/***/ }), + +/***/ 3463: /***/ ((__unused_webpack_module, exports) => { -(function(exports) { - "use strict"; +"use strict"; - function isArray(obj) { - if (obj !== null) { - return Object.prototype.toString.call(obj) === "[object Array]"; - } else { - return false; - } - } +Object.defineProperty(exports, "__esModule", ({ value: true })); - function isObject(obj) { - if (obj !== null) { - return Object.prototype.toString.call(obj) === "[object Object]"; - } else { - return false; - } - } - function strictDeepEqual(first, second) { - // Check the scalar case first. - if (first === second) { - return true; - } +/***/ }), - // Check if they are the same type. - var firstType = Object.prototype.toString.call(first); - if (firstType !== Object.prototype.toString.call(second)) { - return false; - } - // We know that first and second have the same type so we can just check the - // first type from now on. - if (isArray(first) === true) { - // Short circuit if they're not the same length; - if (first.length !== second.length) { - return false; - } - for (var i = 0; i < first.length; i++) { - if (strictDeepEqual(first[i], second[i]) === false) { - return false; - } - } - return true; - } - if (isObject(first) === true) { - // An object is equal if it has the same key/value pairs. - var keysSeen = {}; - for (var key in first) { - if (hasOwnProperty.call(first, key)) { - if (strictDeepEqual(first[key], second[key]) === false) { - return false; - } - keysSeen[key] = true; - } - } - // Now check that there aren't any keys in second that weren't - // in first. - for (var key2 in second) { - if (hasOwnProperty.call(second, key2)) { - if (keysSeen[key2] !== true) { - return false; - } - } - } - return true; - } - return false; - } +/***/ 5945: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - function isFalse(obj) { - // From the spec: - // A false value corresponds to the following values: - // Empty list - // Empty object - // Empty string - // False boolean - // null value +"use strict"; - // First check the scalar values. - if (obj === "" || obj === false || obj === null) { - return true; - } else if (isArray(obj) && obj.length === 0) { - // Check for an empty array. - return true; - } else if (isObject(obj)) { - // Check for an empty object. - for (var key in obj) { - // If there are any keys, then - // the object is not empty so the object - // is not false. - if (obj.hasOwnProperty(key)) { - return false; - } - } - return true; - } else { - return false; - } - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(9634), exports); +tslib_1.__exportStar(__nccwpck_require__(4128), exports); +tslib_1.__exportStar(__nccwpck_require__(1720), exports); +tslib_1.__exportStar(__nccwpck_require__(5474), exports); +tslib_1.__exportStar(__nccwpck_require__(3463), exports); - function objValues(obj) { - var keys = Object.keys(obj); - var values = []; - for (var i = 0; i < keys.length; i++) { - values.push(obj[keys[i]]); - } - return values; - } - function merge(a, b) { - var merged = {}; - for (var key in a) { - merged[key] = a[key]; - } - for (var key2 in b) { - merged[key2] = b[key2]; - } - return merged; - } +/***/ }), - var trimLeft; - if (typeof String.prototype.trimLeft === "function") { - trimLeft = function(str) { - return str.trimLeft(); +/***/ 4170: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.deserializeAws_json1_1UploadLayerPartCommand = exports.deserializeAws_json1_1UntagResourceCommand = exports.deserializeAws_json1_1TagResourceCommand = exports.deserializeAws_json1_1SetRepositoryPolicyCommand = exports.deserializeAws_json1_1PutRepositoryCatalogDataCommand = exports.deserializeAws_json1_1PutRegistryCatalogDataCommand = exports.deserializeAws_json1_1PutImageCommand = exports.deserializeAws_json1_1ListTagsForResourceCommand = exports.deserializeAws_json1_1InitiateLayerUploadCommand = exports.deserializeAws_json1_1GetRepositoryPolicyCommand = exports.deserializeAws_json1_1GetRepositoryCatalogDataCommand = exports.deserializeAws_json1_1GetRegistryCatalogDataCommand = exports.deserializeAws_json1_1GetAuthorizationTokenCommand = exports.deserializeAws_json1_1DescribeRepositoriesCommand = exports.deserializeAws_json1_1DescribeRegistriesCommand = exports.deserializeAws_json1_1DescribeImageTagsCommand = exports.deserializeAws_json1_1DescribeImagesCommand = exports.deserializeAws_json1_1DeleteRepositoryPolicyCommand = exports.deserializeAws_json1_1DeleteRepositoryCommand = exports.deserializeAws_json1_1CreateRepositoryCommand = exports.deserializeAws_json1_1CompleteLayerUploadCommand = exports.deserializeAws_json1_1BatchDeleteImageCommand = exports.deserializeAws_json1_1BatchCheckLayerAvailabilityCommand = exports.serializeAws_json1_1UploadLayerPartCommand = exports.serializeAws_json1_1UntagResourceCommand = exports.serializeAws_json1_1TagResourceCommand = exports.serializeAws_json1_1SetRepositoryPolicyCommand = exports.serializeAws_json1_1PutRepositoryCatalogDataCommand = exports.serializeAws_json1_1PutRegistryCatalogDataCommand = exports.serializeAws_json1_1PutImageCommand = exports.serializeAws_json1_1ListTagsForResourceCommand = exports.serializeAws_json1_1InitiateLayerUploadCommand = exports.serializeAws_json1_1GetRepositoryPolicyCommand = exports.serializeAws_json1_1GetRepositoryCatalogDataCommand = exports.serializeAws_json1_1GetRegistryCatalogDataCommand = exports.serializeAws_json1_1GetAuthorizationTokenCommand = exports.serializeAws_json1_1DescribeRepositoriesCommand = exports.serializeAws_json1_1DescribeRegistriesCommand = exports.serializeAws_json1_1DescribeImageTagsCommand = exports.serializeAws_json1_1DescribeImagesCommand = exports.serializeAws_json1_1DeleteRepositoryPolicyCommand = exports.serializeAws_json1_1DeleteRepositoryCommand = exports.serializeAws_json1_1CreateRepositoryCommand = exports.serializeAws_json1_1CompleteLayerUploadCommand = exports.serializeAws_json1_1BatchDeleteImageCommand = exports.serializeAws_json1_1BatchCheckLayerAvailabilityCommand = void 0; +const protocol_http_1 = __nccwpck_require__(223); +const smithy_client_1 = __nccwpck_require__(4963); +const serializeAws_json1_1BatchCheckLayerAvailabilityCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "SpencerFrontendService.BatchCheckLayerAvailability", }; - } else { - trimLeft = function(str) { - return str.match(/^\s*(.*)/)[1]; + let body; + body = JSON.stringify(serializeAws_json1_1BatchCheckLayerAvailabilityRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1BatchCheckLayerAvailabilityCommand = serializeAws_json1_1BatchCheckLayerAvailabilityCommand; +const serializeAws_json1_1BatchDeleteImageCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "SpencerFrontendService.BatchDeleteImage", }; - } - - // Type constants used to define functions. - var TYPE_NUMBER = 0; - var TYPE_ANY = 1; - var TYPE_STRING = 2; - var TYPE_ARRAY = 3; - var TYPE_OBJECT = 4; - var TYPE_BOOLEAN = 5; - var TYPE_EXPREF = 6; - var TYPE_NULL = 7; - var TYPE_ARRAY_NUMBER = 8; - var TYPE_ARRAY_STRING = 9; - - var TOK_EOF = "EOF"; - var TOK_UNQUOTEDIDENTIFIER = "UnquotedIdentifier"; - var TOK_QUOTEDIDENTIFIER = "QuotedIdentifier"; - var TOK_RBRACKET = "Rbracket"; - var TOK_RPAREN = "Rparen"; - var TOK_COMMA = "Comma"; - var TOK_COLON = "Colon"; - var TOK_RBRACE = "Rbrace"; - var TOK_NUMBER = "Number"; - var TOK_CURRENT = "Current"; - var TOK_EXPREF = "Expref"; - var TOK_PIPE = "Pipe"; - var TOK_OR = "Or"; - var TOK_AND = "And"; - var TOK_EQ = "EQ"; - var TOK_GT = "GT"; - var TOK_LT = "LT"; - var TOK_GTE = "GTE"; - var TOK_LTE = "LTE"; - var TOK_NE = "NE"; - var TOK_FLATTEN = "Flatten"; - var TOK_STAR = "Star"; - var TOK_FILTER = "Filter"; - var TOK_DOT = "Dot"; - var TOK_NOT = "Not"; - var TOK_LBRACE = "Lbrace"; - var TOK_LBRACKET = "Lbracket"; - var TOK_LPAREN= "Lparen"; - var TOK_LITERAL= "Literal"; - - // The "&", "[", "<", ">" tokens - // are not in basicToken because - // there are two token variants - // ("&&", "[?", "<=", ">="). This is specially handled - // below. - - var basicTokens = { - ".": TOK_DOT, - "*": TOK_STAR, - ",": TOK_COMMA, - ":": TOK_COLON, - "{": TOK_LBRACE, - "}": TOK_RBRACE, - "]": TOK_RBRACKET, - "(": TOK_LPAREN, - ")": TOK_RPAREN, - "@": TOK_CURRENT - }; - - var operatorStartToken = { - "<": true, - ">": true, - "=": true, - "!": true - }; - - var skipChars = { - " ": true, - "\t": true, - "\n": true - }; - - - function isAlpha(ch) { - return (ch >= "a" && ch <= "z") || - (ch >= "A" && ch <= "Z") || - ch === "_"; - } - - function isNum(ch) { - return (ch >= "0" && ch <= "9") || - ch === "-"; - } - function isAlphaNum(ch) { - return (ch >= "a" && ch <= "z") || - (ch >= "A" && ch <= "Z") || - (ch >= "0" && ch <= "9") || - ch === "_"; - } - - function Lexer() { - } - Lexer.prototype = { - tokenize: function(stream) { - var tokens = []; - this._current = 0; - var start; - var identifier; - var token; - while (this._current < stream.length) { - if (isAlpha(stream[this._current])) { - start = this._current; - identifier = this._consumeUnquotedIdentifier(stream); - tokens.push({type: TOK_UNQUOTEDIDENTIFIER, - value: identifier, - start: start}); - } else if (basicTokens[stream[this._current]] !== undefined) { - tokens.push({type: basicTokens[stream[this._current]], - value: stream[this._current], - start: this._current}); - this._current++; - } else if (isNum(stream[this._current])) { - token = this._consumeNumber(stream); - tokens.push(token); - } else if (stream[this._current] === "[") { - // No need to increment this._current. This happens - // in _consumeLBracket - token = this._consumeLBracket(stream); - tokens.push(token); - } else if (stream[this._current] === "\"") { - start = this._current; - identifier = this._consumeQuotedIdentifier(stream); - tokens.push({type: TOK_QUOTEDIDENTIFIER, - value: identifier, - start: start}); - } else if (stream[this._current] === "'") { - start = this._current; - identifier = this._consumeRawStringLiteral(stream); - tokens.push({type: TOK_LITERAL, - value: identifier, - start: start}); - } else if (stream[this._current] === "`") { - start = this._current; - var literal = this._consumeLiteral(stream); - tokens.push({type: TOK_LITERAL, - value: literal, - start: start}); - } else if (operatorStartToken[stream[this._current]] !== undefined) { - tokens.push(this._consumeOperator(stream)); - } else if (skipChars[stream[this._current]] !== undefined) { - // Ignore whitespace. - this._current++; - } else if (stream[this._current] === "&") { - start = this._current; - this._current++; - if (stream[this._current] === "&") { - this._current++; - tokens.push({type: TOK_AND, value: "&&", start: start}); - } else { - tokens.push({type: TOK_EXPREF, value: "&", start: start}); - } - } else if (stream[this._current] === "|") { - start = this._current; - this._current++; - if (stream[this._current] === "|") { - this._current++; - tokens.push({type: TOK_OR, value: "||", start: start}); - } else { - tokens.push({type: TOK_PIPE, value: "|", start: start}); - } - } else { - var error = new Error("Unknown character:" + stream[this._current]); - error.name = "LexerError"; - throw error; - } - } - return tokens; - }, - - _consumeUnquotedIdentifier: function(stream) { - var start = this._current; - this._current++; - while (this._current < stream.length && isAlphaNum(stream[this._current])) { - this._current++; - } - return stream.slice(start, this._current); - }, - - _consumeQuotedIdentifier: function(stream) { - var start = this._current; - this._current++; - var maxLength = stream.length; - while (stream[this._current] !== "\"" && this._current < maxLength) { - // You can escape a double quote and you can escape an escape. - var current = this._current; - if (stream[current] === "\\" && (stream[current + 1] === "\\" || - stream[current + 1] === "\"")) { - current += 2; - } else { - current++; - } - this._current = current; - } - this._current++; - return JSON.parse(stream.slice(start, this._current)); - }, - - _consumeRawStringLiteral: function(stream) { - var start = this._current; - this._current++; - var maxLength = stream.length; - while (stream[this._current] !== "'" && this._current < maxLength) { - // You can escape a single quote and you can escape an escape. - var current = this._current; - if (stream[current] === "\\" && (stream[current + 1] === "\\" || - stream[current + 1] === "'")) { - current += 2; - } else { - current++; - } - this._current = current; - } - this._current++; - var literal = stream.slice(start + 1, this._current - 1); - return literal.replace("\\'", "'"); - }, - - _consumeNumber: function(stream) { - var start = this._current; - this._current++; - var maxLength = stream.length; - while (isNum(stream[this._current]) && this._current < maxLength) { - this._current++; - } - var value = parseInt(stream.slice(start, this._current)); - return {type: TOK_NUMBER, value: value, start: start}; - }, - - _consumeLBracket: function(stream) { - var start = this._current; - this._current++; - if (stream[this._current] === "?") { - this._current++; - return {type: TOK_FILTER, value: "[?", start: start}; - } else if (stream[this._current] === "]") { - this._current++; - return {type: TOK_FLATTEN, value: "[]", start: start}; - } else { - return {type: TOK_LBRACKET, value: "[", start: start}; - } - }, - - _consumeOperator: function(stream) { - var start = this._current; - var startingChar = stream[start]; - this._current++; - if (startingChar === "!") { - if (stream[this._current] === "=") { - this._current++; - return {type: TOK_NE, value: "!=", start: start}; - } else { - return {type: TOK_NOT, value: "!", start: start}; - } - } else if (startingChar === "<") { - if (stream[this._current] === "=") { - this._current++; - return {type: TOK_LTE, value: "<=", start: start}; - } else { - return {type: TOK_LT, value: "<", start: start}; - } - } else if (startingChar === ">") { - if (stream[this._current] === "=") { - this._current++; - return {type: TOK_GTE, value: ">=", start: start}; - } else { - return {type: TOK_GT, value: ">", start: start}; - } - } else if (startingChar === "=") { - if (stream[this._current] === "=") { - this._current++; - return {type: TOK_EQ, value: "==", start: start}; - } - } - }, - - _consumeLiteral: function(stream) { - this._current++; - var start = this._current; - var maxLength = stream.length; - var literal; - while(stream[this._current] !== "`" && this._current < maxLength) { - // You can escape a literal char or you can escape the escape. - var current = this._current; - if (stream[current] === "\\" && (stream[current + 1] === "\\" || - stream[current + 1] === "`")) { - current += 2; - } else { - current++; - } - this._current = current; - } - var literalString = trimLeft(stream.slice(start, this._current)); - literalString = literalString.replace("\\`", "`"); - if (this._looksLikeJSON(literalString)) { - literal = JSON.parse(literalString); - } else { - // Try to JSON parse it as "" - literal = JSON.parse("\"" + literalString + "\""); - } - // +1 gets us to the ending "`", +1 to move on to the next char. - this._current++; - return literal; - }, - - _looksLikeJSON: function(literalString) { - var startingChars = "[{\""; - var jsonLiterals = ["true", "false", "null"]; - var numberLooking = "-0123456789"; - - if (literalString === "") { - return false; - } else if (startingChars.indexOf(literalString[0]) >= 0) { - return true; - } else if (jsonLiterals.indexOf(literalString) >= 0) { - return true; - } else if (numberLooking.indexOf(literalString[0]) >= 0) { - try { - JSON.parse(literalString); - return true; - } catch (ex) { - return false; - } - } else { - return false; - } - } - }; - - var bindingPower = {}; - bindingPower[TOK_EOF] = 0; - bindingPower[TOK_UNQUOTEDIDENTIFIER] = 0; - bindingPower[TOK_QUOTEDIDENTIFIER] = 0; - bindingPower[TOK_RBRACKET] = 0; - bindingPower[TOK_RPAREN] = 0; - bindingPower[TOK_COMMA] = 0; - bindingPower[TOK_RBRACE] = 0; - bindingPower[TOK_NUMBER] = 0; - bindingPower[TOK_CURRENT] = 0; - bindingPower[TOK_EXPREF] = 0; - bindingPower[TOK_PIPE] = 1; - bindingPower[TOK_OR] = 2; - bindingPower[TOK_AND] = 3; - bindingPower[TOK_EQ] = 5; - bindingPower[TOK_GT] = 5; - bindingPower[TOK_LT] = 5; - bindingPower[TOK_GTE] = 5; - bindingPower[TOK_LTE] = 5; - bindingPower[TOK_NE] = 5; - bindingPower[TOK_FLATTEN] = 9; - bindingPower[TOK_STAR] = 20; - bindingPower[TOK_FILTER] = 21; - bindingPower[TOK_DOT] = 40; - bindingPower[TOK_NOT] = 45; - bindingPower[TOK_LBRACE] = 50; - bindingPower[TOK_LBRACKET] = 55; - bindingPower[TOK_LPAREN] = 60; - - function Parser() { - } - - Parser.prototype = { - parse: function(expression) { - this._loadTokens(expression); - this.index = 0; - var ast = this.expression(0); - if (this._lookahead(0) !== TOK_EOF) { - var t = this._lookaheadToken(0); - var error = new Error( - "Unexpected token type: " + t.type + ", value: " + t.value); - error.name = "ParserError"; - throw error; - } - return ast; - }, - - _loadTokens: function(expression) { - var lexer = new Lexer(); - var tokens = lexer.tokenize(expression); - tokens.push({type: TOK_EOF, value: "", start: expression.length}); - this.tokens = tokens; - }, - - expression: function(rbp) { - var leftToken = this._lookaheadToken(0); - this._advance(); - var left = this.nud(leftToken); - var currentToken = this._lookahead(0); - while (rbp < bindingPower[currentToken]) { - this._advance(); - left = this.led(currentToken, left); - currentToken = this._lookahead(0); - } - return left; - }, - - _lookahead: function(number) { - return this.tokens[this.index + number].type; - }, - - _lookaheadToken: function(number) { - return this.tokens[this.index + number]; - }, - - _advance: function() { - this.index++; - }, - - nud: function(token) { - var left; - var right; - var expression; - switch (token.type) { - case TOK_LITERAL: - return {type: "Literal", value: token.value}; - case TOK_UNQUOTEDIDENTIFIER: - return {type: "Field", name: token.value}; - case TOK_QUOTEDIDENTIFIER: - var node = {type: "Field", name: token.value}; - if (this._lookahead(0) === TOK_LPAREN) { - throw new Error("Quoted identifier not allowed for function names."); - } else { - return node; - } - break; - case TOK_NOT: - right = this.expression(bindingPower.Not); - return {type: "NotExpression", children: [right]}; - case TOK_STAR: - left = {type: "Identity"}; - right = null; - if (this._lookahead(0) === TOK_RBRACKET) { - // This can happen in a multiselect, - // [a, b, *] - right = {type: "Identity"}; - } else { - right = this._parseProjectionRHS(bindingPower.Star); - } - return {type: "ValueProjection", children: [left, right]}; - case TOK_FILTER: - return this.led(token.type, {type: "Identity"}); - case TOK_LBRACE: - return this._parseMultiselectHash(); - case TOK_FLATTEN: - left = {type: TOK_FLATTEN, children: [{type: "Identity"}]}; - right = this._parseProjectionRHS(bindingPower.Flatten); - return {type: "Projection", children: [left, right]}; - case TOK_LBRACKET: - if (this._lookahead(0) === TOK_NUMBER || this._lookahead(0) === TOK_COLON) { - right = this._parseIndexExpression(); - return this._projectIfSlice({type: "Identity"}, right); - } else if (this._lookahead(0) === TOK_STAR && - this._lookahead(1) === TOK_RBRACKET) { - this._advance(); - this._advance(); - right = this._parseProjectionRHS(bindingPower.Star); - return {type: "Projection", - children: [{type: "Identity"}, right]}; - } else { - return this._parseMultiselectList(); - } - break; - case TOK_CURRENT: - return {type: TOK_CURRENT}; - case TOK_EXPREF: - expression = this.expression(bindingPower.Expref); - return {type: "ExpressionReference", children: [expression]}; - case TOK_LPAREN: - var args = []; - while (this._lookahead(0) !== TOK_RPAREN) { - if (this._lookahead(0) === TOK_CURRENT) { - expression = {type: TOK_CURRENT}; - this._advance(); - } else { - expression = this.expression(0); - } - args.push(expression); - } - this._match(TOK_RPAREN); - return args[0]; - default: - this._errorToken(token); - } - }, - - led: function(tokenName, left) { - var right; - switch(tokenName) { - case TOK_DOT: - var rbp = bindingPower.Dot; - if (this._lookahead(0) !== TOK_STAR) { - right = this._parseDotRHS(rbp); - return {type: "Subexpression", children: [left, right]}; - } else { - // Creating a projection. - this._advance(); - right = this._parseProjectionRHS(rbp); - return {type: "ValueProjection", children: [left, right]}; - } - break; - case TOK_PIPE: - right = this.expression(bindingPower.Pipe); - return {type: TOK_PIPE, children: [left, right]}; - case TOK_OR: - right = this.expression(bindingPower.Or); - return {type: "OrExpression", children: [left, right]}; - case TOK_AND: - right = this.expression(bindingPower.And); - return {type: "AndExpression", children: [left, right]}; - case TOK_LPAREN: - var name = left.name; - var args = []; - var expression, node; - while (this._lookahead(0) !== TOK_RPAREN) { - if (this._lookahead(0) === TOK_CURRENT) { - expression = {type: TOK_CURRENT}; - this._advance(); - } else { - expression = this.expression(0); - } - if (this._lookahead(0) === TOK_COMMA) { - this._match(TOK_COMMA); - } - args.push(expression); - } - this._match(TOK_RPAREN); - node = {type: "Function", name: name, children: args}; - return node; - case TOK_FILTER: - var condition = this.expression(0); - this._match(TOK_RBRACKET); - if (this._lookahead(0) === TOK_FLATTEN) { - right = {type: "Identity"}; - } else { - right = this._parseProjectionRHS(bindingPower.Filter); - } - return {type: "FilterProjection", children: [left, right, condition]}; - case TOK_FLATTEN: - var leftNode = {type: TOK_FLATTEN, children: [left]}; - var rightNode = this._parseProjectionRHS(bindingPower.Flatten); - return {type: "Projection", children: [leftNode, rightNode]}; - case TOK_EQ: - case TOK_NE: - case TOK_GT: - case TOK_GTE: - case TOK_LT: - case TOK_LTE: - return this._parseComparator(left, tokenName); - case TOK_LBRACKET: - var token = this._lookaheadToken(0); - if (token.type === TOK_NUMBER || token.type === TOK_COLON) { - right = this._parseIndexExpression(); - return this._projectIfSlice(left, right); - } else { - this._match(TOK_STAR); - this._match(TOK_RBRACKET); - right = this._parseProjectionRHS(bindingPower.Star); - return {type: "Projection", children: [left, right]}; - } - break; - default: - this._errorToken(this._lookaheadToken(0)); - } - }, - - _match: function(tokenType) { - if (this._lookahead(0) === tokenType) { - this._advance(); - } else { - var t = this._lookaheadToken(0); - var error = new Error("Expected " + tokenType + ", got: " + t.type); - error.name = "ParserError"; - throw error; - } - }, - - _errorToken: function(token) { - var error = new Error("Invalid token (" + - token.type + "): \"" + - token.value + "\""); - error.name = "ParserError"; - throw error; - }, - - - _parseIndexExpression: function() { - if (this._lookahead(0) === TOK_COLON || this._lookahead(1) === TOK_COLON) { - return this._parseSliceExpression(); - } else { - var node = { - type: "Index", - value: this._lookaheadToken(0).value}; - this._advance(); - this._match(TOK_RBRACKET); - return node; - } - }, - - _projectIfSlice: function(left, right) { - var indexExpr = {type: "IndexExpression", children: [left, right]}; - if (right.type === "Slice") { - return { - type: "Projection", - children: [indexExpr, this._parseProjectionRHS(bindingPower.Star)] - }; - } else { - return indexExpr; - } - }, - - _parseSliceExpression: function() { - // [start:end:step] where each part is optional, as well as the last - // colon. - var parts = [null, null, null]; - var index = 0; - var currentToken = this._lookahead(0); - while (currentToken !== TOK_RBRACKET && index < 3) { - if (currentToken === TOK_COLON) { - index++; - this._advance(); - } else if (currentToken === TOK_NUMBER) { - parts[index] = this._lookaheadToken(0).value; - this._advance(); - } else { - var t = this._lookahead(0); - var error = new Error("Syntax error, unexpected token: " + - t.value + "(" + t.type + ")"); - error.name = "Parsererror"; - throw error; - } - currentToken = this._lookahead(0); - } - this._match(TOK_RBRACKET); - return { - type: "Slice", - children: parts - }; - }, - - _parseComparator: function(left, comparator) { - var right = this.expression(bindingPower[comparator]); - return {type: "Comparator", name: comparator, children: [left, right]}; - }, - - _parseDotRHS: function(rbp) { - var lookahead = this._lookahead(0); - var exprTokens = [TOK_UNQUOTEDIDENTIFIER, TOK_QUOTEDIDENTIFIER, TOK_STAR]; - if (exprTokens.indexOf(lookahead) >= 0) { - return this.expression(rbp); - } else if (lookahead === TOK_LBRACKET) { - this._match(TOK_LBRACKET); - return this._parseMultiselectList(); - } else if (lookahead === TOK_LBRACE) { - this._match(TOK_LBRACE); - return this._parseMultiselectHash(); - } - }, - - _parseProjectionRHS: function(rbp) { - var right; - if (bindingPower[this._lookahead(0)] < 10) { - right = {type: "Identity"}; - } else if (this._lookahead(0) === TOK_LBRACKET) { - right = this.expression(rbp); - } else if (this._lookahead(0) === TOK_FILTER) { - right = this.expression(rbp); - } else if (this._lookahead(0) === TOK_DOT) { - this._match(TOK_DOT); - right = this._parseDotRHS(rbp); - } else { - var t = this._lookaheadToken(0); - var error = new Error("Sytanx error, unexpected token: " + - t.value + "(" + t.type + ")"); - error.name = "ParserError"; - throw error; - } - return right; - }, - - _parseMultiselectList: function() { - var expressions = []; - while (this._lookahead(0) !== TOK_RBRACKET) { - var expression = this.expression(0); - expressions.push(expression); - if (this._lookahead(0) === TOK_COMMA) { - this._match(TOK_COMMA); - if (this._lookahead(0) === TOK_RBRACKET) { - throw new Error("Unexpected token Rbracket"); - } - } - } - this._match(TOK_RBRACKET); - return {type: "MultiSelectList", children: expressions}; - }, - - _parseMultiselectHash: function() { - var pairs = []; - var identifierTypes = [TOK_UNQUOTEDIDENTIFIER, TOK_QUOTEDIDENTIFIER]; - var keyToken, keyName, value, node; - for (;;) { - keyToken = this._lookaheadToken(0); - if (identifierTypes.indexOf(keyToken.type) < 0) { - throw new Error("Expecting an identifier token, got: " + - keyToken.type); - } - keyName = keyToken.value; - this._advance(); - this._match(TOK_COLON); - value = this.expression(0); - node = {type: "KeyValuePair", name: keyName, value: value}; - pairs.push(node); - if (this._lookahead(0) === TOK_COMMA) { - this._match(TOK_COMMA); - } else if (this._lookahead(0) === TOK_RBRACE) { - this._match(TOK_RBRACE); - break; - } - } - return {type: "MultiSelectHash", children: pairs}; - } - }; - - - function TreeInterpreter(runtime) { - this.runtime = runtime; - } - - TreeInterpreter.prototype = { - search: function(node, value) { - return this.visit(node, value); - }, - - visit: function(node, value) { - var matched, current, result, first, second, field, left, right, collected, i; - switch (node.type) { - case "Field": - if (value === null ) { - return null; - } else if (isObject(value)) { - field = value[node.name]; - if (field === undefined) { - return null; - } else { - return field; - } - } else { - return null; - } - break; - case "Subexpression": - result = this.visit(node.children[0], value); - for (i = 1; i < node.children.length; i++) { - result = this.visit(node.children[1], result); - if (result === null) { - return null; - } - } - return result; - case "IndexExpression": - left = this.visit(node.children[0], value); - right = this.visit(node.children[1], left); - return right; - case "Index": - if (!isArray(value)) { - return null; - } - var index = node.value; - if (index < 0) { - index = value.length + index; - } - result = value[index]; - if (result === undefined) { - result = null; - } - return result; - case "Slice": - if (!isArray(value)) { - return null; - } - var sliceParams = node.children.slice(0); - var computed = this.computeSliceParams(value.length, sliceParams); - var start = computed[0]; - var stop = computed[1]; - var step = computed[2]; - result = []; - if (step > 0) { - for (i = start; i < stop; i += step) { - result.push(value[i]); - } - } else { - for (i = start; i > stop; i += step) { - result.push(value[i]); - } - } - return result; - case "Projection": - // Evaluate left child. - var base = this.visit(node.children[0], value); - if (!isArray(base)) { - return null; - } - collected = []; - for (i = 0; i < base.length; i++) { - current = this.visit(node.children[1], base[i]); - if (current !== null) { - collected.push(current); - } - } - return collected; - case "ValueProjection": - // Evaluate left child. - base = this.visit(node.children[0], value); - if (!isObject(base)) { - return null; - } - collected = []; - var values = objValues(base); - for (i = 0; i < values.length; i++) { - current = this.visit(node.children[1], values[i]); - if (current !== null) { - collected.push(current); - } - } - return collected; - case "FilterProjection": - base = this.visit(node.children[0], value); - if (!isArray(base)) { - return null; - } - var filtered = []; - var finalResults = []; - for (i = 0; i < base.length; i++) { - matched = this.visit(node.children[2], base[i]); - if (!isFalse(matched)) { - filtered.push(base[i]); - } - } - for (var j = 0; j < filtered.length; j++) { - current = this.visit(node.children[1], filtered[j]); - if (current !== null) { - finalResults.push(current); - } - } - return finalResults; - case "Comparator": - first = this.visit(node.children[0], value); - second = this.visit(node.children[1], value); - switch(node.name) { - case TOK_EQ: - result = strictDeepEqual(first, second); - break; - case TOK_NE: - result = !strictDeepEqual(first, second); - break; - case TOK_GT: - result = first > second; - break; - case TOK_GTE: - result = first >= second; - break; - case TOK_LT: - result = first < second; - break; - case TOK_LTE: - result = first <= second; - break; - default: - throw new Error("Unknown comparator: " + node.name); - } - return result; - case TOK_FLATTEN: - var original = this.visit(node.children[0], value); - if (!isArray(original)) { - return null; - } - var merged = []; - for (i = 0; i < original.length; i++) { - current = original[i]; - if (isArray(current)) { - merged.push.apply(merged, current); - } else { - merged.push(current); - } - } - return merged; - case "Identity": - return value; - case "MultiSelectList": - if (value === null) { - return null; - } - collected = []; - for (i = 0; i < node.children.length; i++) { - collected.push(this.visit(node.children[i], value)); - } - return collected; - case "MultiSelectHash": - if (value === null) { - return null; - } - collected = {}; - var child; - for (i = 0; i < node.children.length; i++) { - child = node.children[i]; - collected[child.name] = this.visit(child.value, value); - } - return collected; - case "OrExpression": - matched = this.visit(node.children[0], value); - if (isFalse(matched)) { - matched = this.visit(node.children[1], value); - } - return matched; - case "AndExpression": - first = this.visit(node.children[0], value); - - if (isFalse(first) === true) { - return first; - } - return this.visit(node.children[1], value); - case "NotExpression": - first = this.visit(node.children[0], value); - return isFalse(first); - case "Literal": - return node.value; - case TOK_PIPE: - left = this.visit(node.children[0], value); - return this.visit(node.children[1], left); - case TOK_CURRENT: - return value; - case "Function": - var resolvedArgs = []; - for (i = 0; i < node.children.length; i++) { - resolvedArgs.push(this.visit(node.children[i], value)); - } - return this.runtime.callFunction(node.name, resolvedArgs); - case "ExpressionReference": - var refNode = node.children[0]; - // Tag the node with a specific attribute so the type - // checker verify the type. - refNode.jmespathType = TOK_EXPREF; - return refNode; - default: - throw new Error("Unknown node type: " + node.type); - } - }, - - computeSliceParams: function(arrayLength, sliceParams) { - var start = sliceParams[0]; - var stop = sliceParams[1]; - var step = sliceParams[2]; - var computed = [null, null, null]; - if (step === null) { - step = 1; - } else if (step === 0) { - var error = new Error("Invalid slice, step cannot be 0"); - error.name = "RuntimeError"; - throw error; - } - var stepValueNegative = step < 0 ? true : false; - - if (start === null) { - start = stepValueNegative ? arrayLength - 1 : 0; - } else { - start = this.capSliceRange(arrayLength, start, step); - } - - if (stop === null) { - stop = stepValueNegative ? -1 : arrayLength; - } else { - stop = this.capSliceRange(arrayLength, stop, step); - } - computed[0] = start; - computed[1] = stop; - computed[2] = step; - return computed; - }, - - capSliceRange: function(arrayLength, actualValue, step) { - if (actualValue < 0) { - actualValue += arrayLength; - if (actualValue < 0) { - actualValue = step < 0 ? -1 : 0; - } - } else if (actualValue >= arrayLength) { - actualValue = step < 0 ? arrayLength - 1 : arrayLength; - } - return actualValue; - } - - }; - - function Runtime(interpreter) { - this._interpreter = interpreter; - this.functionTable = { - // name: [function, ] - // The can be: - // - // { - // args: [[type1, type2], [type1, type2]], - // variadic: true|false - // } - // - // Each arg in the arg list is a list of valid types - // (if the function is overloaded and supports multiple - // types. If the type is "any" then no type checking - // occurs on the argument. Variadic is optional - // and if not provided is assumed to be false. - abs: {_func: this._functionAbs, _signature: [{types: [TYPE_NUMBER]}]}, - avg: {_func: this._functionAvg, _signature: [{types: [TYPE_ARRAY_NUMBER]}]}, - ceil: {_func: this._functionCeil, _signature: [{types: [TYPE_NUMBER]}]}, - contains: { - _func: this._functionContains, - _signature: [{types: [TYPE_STRING, TYPE_ARRAY]}, - {types: [TYPE_ANY]}]}, - "ends_with": { - _func: this._functionEndsWith, - _signature: [{types: [TYPE_STRING]}, {types: [TYPE_STRING]}]}, - floor: {_func: this._functionFloor, _signature: [{types: [TYPE_NUMBER]}]}, - length: { - _func: this._functionLength, - _signature: [{types: [TYPE_STRING, TYPE_ARRAY, TYPE_OBJECT]}]}, - map: { - _func: this._functionMap, - _signature: [{types: [TYPE_EXPREF]}, {types: [TYPE_ARRAY]}]}, - max: { - _func: this._functionMax, - _signature: [{types: [TYPE_ARRAY_NUMBER, TYPE_ARRAY_STRING]}]}, - "merge": { - _func: this._functionMerge, - _signature: [{types: [TYPE_OBJECT], variadic: true}] - }, - "max_by": { - _func: this._functionMaxBy, - _signature: [{types: [TYPE_ARRAY]}, {types: [TYPE_EXPREF]}] - }, - sum: {_func: this._functionSum, _signature: [{types: [TYPE_ARRAY_NUMBER]}]}, - "starts_with": { - _func: this._functionStartsWith, - _signature: [{types: [TYPE_STRING]}, {types: [TYPE_STRING]}]}, - min: { - _func: this._functionMin, - _signature: [{types: [TYPE_ARRAY_NUMBER, TYPE_ARRAY_STRING]}]}, - "min_by": { - _func: this._functionMinBy, - _signature: [{types: [TYPE_ARRAY]}, {types: [TYPE_EXPREF]}] - }, - type: {_func: this._functionType, _signature: [{types: [TYPE_ANY]}]}, - keys: {_func: this._functionKeys, _signature: [{types: [TYPE_OBJECT]}]}, - values: {_func: this._functionValues, _signature: [{types: [TYPE_OBJECT]}]}, - sort: {_func: this._functionSort, _signature: [{types: [TYPE_ARRAY_STRING, TYPE_ARRAY_NUMBER]}]}, - "sort_by": { - _func: this._functionSortBy, - _signature: [{types: [TYPE_ARRAY]}, {types: [TYPE_EXPREF]}] - }, - join: { - _func: this._functionJoin, - _signature: [ - {types: [TYPE_STRING]}, - {types: [TYPE_ARRAY_STRING]} - ] - }, - reverse: { - _func: this._functionReverse, - _signature: [{types: [TYPE_STRING, TYPE_ARRAY]}]}, - "to_array": {_func: this._functionToArray, _signature: [{types: [TYPE_ANY]}]}, - "to_string": {_func: this._functionToString, _signature: [{types: [TYPE_ANY]}]}, - "to_number": {_func: this._functionToNumber, _signature: [{types: [TYPE_ANY]}]}, - "not_null": { - _func: this._functionNotNull, - _signature: [{types: [TYPE_ANY], variadic: true}] - } + let body; + body = JSON.stringify(serializeAws_json1_1BatchDeleteImageRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1BatchDeleteImageCommand = serializeAws_json1_1BatchDeleteImageCommand; +const serializeAws_json1_1CompleteLayerUploadCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "SpencerFrontendService.CompleteLayerUpload", }; - } + let body; + body = JSON.stringify(serializeAws_json1_1CompleteLayerUploadRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1CompleteLayerUploadCommand = serializeAws_json1_1CompleteLayerUploadCommand; +const serializeAws_json1_1CreateRepositoryCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "SpencerFrontendService.CreateRepository", + }; + let body; + body = JSON.stringify(serializeAws_json1_1CreateRepositoryRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1CreateRepositoryCommand = serializeAws_json1_1CreateRepositoryCommand; +const serializeAws_json1_1DeleteRepositoryCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "SpencerFrontendService.DeleteRepository", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DeleteRepositoryRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DeleteRepositoryCommand = serializeAws_json1_1DeleteRepositoryCommand; +const serializeAws_json1_1DeleteRepositoryPolicyCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "SpencerFrontendService.DeleteRepositoryPolicy", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DeleteRepositoryPolicyRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DeleteRepositoryPolicyCommand = serializeAws_json1_1DeleteRepositoryPolicyCommand; +const serializeAws_json1_1DescribeImagesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "SpencerFrontendService.DescribeImages", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DescribeImagesRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DescribeImagesCommand = serializeAws_json1_1DescribeImagesCommand; +const serializeAws_json1_1DescribeImageTagsCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "SpencerFrontendService.DescribeImageTags", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DescribeImageTagsRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DescribeImageTagsCommand = serializeAws_json1_1DescribeImageTagsCommand; +const serializeAws_json1_1DescribeRegistriesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "SpencerFrontendService.DescribeRegistries", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DescribeRegistriesRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DescribeRegistriesCommand = serializeAws_json1_1DescribeRegistriesCommand; +const serializeAws_json1_1DescribeRepositoriesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "SpencerFrontendService.DescribeRepositories", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DescribeRepositoriesRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DescribeRepositoriesCommand = serializeAws_json1_1DescribeRepositoriesCommand; +const serializeAws_json1_1GetAuthorizationTokenCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "SpencerFrontendService.GetAuthorizationToken", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetAuthorizationTokenRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetAuthorizationTokenCommand = serializeAws_json1_1GetAuthorizationTokenCommand; +const serializeAws_json1_1GetRegistryCatalogDataCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "SpencerFrontendService.GetRegistryCatalogData", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetRegistryCatalogDataRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetRegistryCatalogDataCommand = serializeAws_json1_1GetRegistryCatalogDataCommand; +const serializeAws_json1_1GetRepositoryCatalogDataCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "SpencerFrontendService.GetRepositoryCatalogData", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetRepositoryCatalogDataRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetRepositoryCatalogDataCommand = serializeAws_json1_1GetRepositoryCatalogDataCommand; +const serializeAws_json1_1GetRepositoryPolicyCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "SpencerFrontendService.GetRepositoryPolicy", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetRepositoryPolicyRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetRepositoryPolicyCommand = serializeAws_json1_1GetRepositoryPolicyCommand; +const serializeAws_json1_1InitiateLayerUploadCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "SpencerFrontendService.InitiateLayerUpload", + }; + let body; + body = JSON.stringify(serializeAws_json1_1InitiateLayerUploadRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1InitiateLayerUploadCommand = serializeAws_json1_1InitiateLayerUploadCommand; +const serializeAws_json1_1ListTagsForResourceCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "SpencerFrontendService.ListTagsForResource", + }; + let body; + body = JSON.stringify(serializeAws_json1_1ListTagsForResourceRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1ListTagsForResourceCommand = serializeAws_json1_1ListTagsForResourceCommand; +const serializeAws_json1_1PutImageCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "SpencerFrontendService.PutImage", + }; + let body; + body = JSON.stringify(serializeAws_json1_1PutImageRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1PutImageCommand = serializeAws_json1_1PutImageCommand; +const serializeAws_json1_1PutRegistryCatalogDataCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "SpencerFrontendService.PutRegistryCatalogData", + }; + let body; + body = JSON.stringify(serializeAws_json1_1PutRegistryCatalogDataRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1PutRegistryCatalogDataCommand = serializeAws_json1_1PutRegistryCatalogDataCommand; +const serializeAws_json1_1PutRepositoryCatalogDataCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "SpencerFrontendService.PutRepositoryCatalogData", + }; + let body; + body = JSON.stringify(serializeAws_json1_1PutRepositoryCatalogDataRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1PutRepositoryCatalogDataCommand = serializeAws_json1_1PutRepositoryCatalogDataCommand; +const serializeAws_json1_1SetRepositoryPolicyCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "SpencerFrontendService.SetRepositoryPolicy", + }; + let body; + body = JSON.stringify(serializeAws_json1_1SetRepositoryPolicyRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1SetRepositoryPolicyCommand = serializeAws_json1_1SetRepositoryPolicyCommand; +const serializeAws_json1_1TagResourceCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "SpencerFrontendService.TagResource", + }; + let body; + body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1TagResourceCommand = serializeAws_json1_1TagResourceCommand; +const serializeAws_json1_1UntagResourceCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "SpencerFrontendService.UntagResource", + }; + let body; + body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1UntagResourceCommand = serializeAws_json1_1UntagResourceCommand; +const serializeAws_json1_1UploadLayerPartCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "SpencerFrontendService.UploadLayerPart", + }; + let body; + body = JSON.stringify(serializeAws_json1_1UploadLayerPartRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1UploadLayerPartCommand = serializeAws_json1_1UploadLayerPartCommand; +const deserializeAws_json1_1BatchCheckLayerAvailabilityCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1BatchCheckLayerAvailabilityCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1BatchCheckLayerAvailabilityResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1BatchCheckLayerAvailabilityCommand = deserializeAws_json1_1BatchCheckLayerAvailabilityCommand; +const deserializeAws_json1_1BatchCheckLayerAvailabilityCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecrpublic#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RegistryNotFoundException": + case "com.amazonaws.ecrpublic#RegistryNotFoundException": + response = { + ...(await deserializeAws_json1_1RegistryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecrpublic#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecrpublic#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1BatchDeleteImageCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1BatchDeleteImageCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1BatchDeleteImageResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1BatchDeleteImageCommand = deserializeAws_json1_1BatchDeleteImageCommand; +const deserializeAws_json1_1BatchDeleteImageCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecrpublic#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecrpublic#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecrpublic#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1CompleteLayerUploadCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1CompleteLayerUploadCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1CompleteLayerUploadResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1CompleteLayerUploadCommand = deserializeAws_json1_1CompleteLayerUploadCommand; +const deserializeAws_json1_1CompleteLayerUploadCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "EmptyUploadException": + case "com.amazonaws.ecrpublic#EmptyUploadException": + response = { + ...(await deserializeAws_json1_1EmptyUploadExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidLayerException": + case "com.amazonaws.ecrpublic#InvalidLayerException": + response = { + ...(await deserializeAws_json1_1InvalidLayerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.ecrpublic#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LayerAlreadyExistsException": + case "com.amazonaws.ecrpublic#LayerAlreadyExistsException": + response = { + ...(await deserializeAws_json1_1LayerAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LayerPartTooSmallException": + case "com.amazonaws.ecrpublic#LayerPartTooSmallException": + response = { + ...(await deserializeAws_json1_1LayerPartTooSmallExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RegistryNotFoundException": + case "com.amazonaws.ecrpublic#RegistryNotFoundException": + response = { + ...(await deserializeAws_json1_1RegistryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecrpublic#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecrpublic#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnsupportedCommandException": + case "com.amazonaws.ecrpublic#UnsupportedCommandException": + response = { + ...(await deserializeAws_json1_1UnsupportedCommandExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UploadNotFoundException": + case "com.amazonaws.ecrpublic#UploadNotFoundException": + response = { + ...(await deserializeAws_json1_1UploadNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1CreateRepositoryCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1CreateRepositoryCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1CreateRepositoryResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1CreateRepositoryCommand = deserializeAws_json1_1CreateRepositoryCommand; +const deserializeAws_json1_1CreateRepositoryCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecrpublic#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidTagParameterException": + case "com.amazonaws.ecrpublic#InvalidTagParameterException": + response = { + ...(await deserializeAws_json1_1InvalidTagParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.ecrpublic#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryAlreadyExistsException": + case "com.amazonaws.ecrpublic#RepositoryAlreadyExistsException": + response = { + ...(await deserializeAws_json1_1RepositoryAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecrpublic#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyTagsException": + case "com.amazonaws.ecrpublic#TooManyTagsException": + response = { + ...(await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1DeleteRepositoryCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DeleteRepositoryCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DeleteRepositoryResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DeleteRepositoryCommand = deserializeAws_json1_1DeleteRepositoryCommand; +const deserializeAws_json1_1DeleteRepositoryCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecrpublic#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotEmptyException": + case "com.amazonaws.ecrpublic#RepositoryNotEmptyException": + response = { + ...(await deserializeAws_json1_1RepositoryNotEmptyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecrpublic#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecrpublic#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1DeleteRepositoryPolicyCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DeleteRepositoryPolicyCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DeleteRepositoryPolicyResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DeleteRepositoryPolicyCommand = deserializeAws_json1_1DeleteRepositoryPolicyCommand; +const deserializeAws_json1_1DeleteRepositoryPolicyCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecrpublic#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecrpublic#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryPolicyNotFoundException": + case "com.amazonaws.ecrpublic#RepositoryPolicyNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryPolicyNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecrpublic#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1DescribeImagesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DescribeImagesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DescribeImagesResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DescribeImagesCommand = deserializeAws_json1_1DescribeImagesCommand; +const deserializeAws_json1_1DescribeImagesCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ImageNotFoundException": + case "com.amazonaws.ecrpublic#ImageNotFoundException": + response = { + ...(await deserializeAws_json1_1ImageNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.ecrpublic#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecrpublic#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecrpublic#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1DescribeImageTagsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DescribeImageTagsCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DescribeImageTagsResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DescribeImageTagsCommand = deserializeAws_json1_1DescribeImageTagsCommand; +const deserializeAws_json1_1DescribeImageTagsCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecrpublic#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecrpublic#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecrpublic#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1DescribeRegistriesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DescribeRegistriesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DescribeRegistriesResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DescribeRegistriesCommand = deserializeAws_json1_1DescribeRegistriesCommand; +const deserializeAws_json1_1DescribeRegistriesCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecrpublic#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecrpublic#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnsupportedCommandException": + case "com.amazonaws.ecrpublic#UnsupportedCommandException": + response = { + ...(await deserializeAws_json1_1UnsupportedCommandExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1DescribeRepositoriesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DescribeRepositoriesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DescribeRepositoriesResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DescribeRepositoriesCommand = deserializeAws_json1_1DescribeRepositoriesCommand; +const deserializeAws_json1_1DescribeRepositoriesCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecrpublic#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecrpublic#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecrpublic#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1GetAuthorizationTokenCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetAuthorizationTokenCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetAuthorizationTokenResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetAuthorizationTokenCommand = deserializeAws_json1_1GetAuthorizationTokenCommand; +const deserializeAws_json1_1GetAuthorizationTokenCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecrpublic#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecrpublic#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1GetRegistryCatalogDataCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetRegistryCatalogDataCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetRegistryCatalogDataResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetRegistryCatalogDataCommand = deserializeAws_json1_1GetRegistryCatalogDataCommand; +const deserializeAws_json1_1GetRegistryCatalogDataCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ServerException": + case "com.amazonaws.ecrpublic#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnsupportedCommandException": + case "com.amazonaws.ecrpublic#UnsupportedCommandException": + response = { + ...(await deserializeAws_json1_1UnsupportedCommandExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1GetRepositoryCatalogDataCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetRepositoryCatalogDataCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetRepositoryCatalogDataResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetRepositoryCatalogDataCommand = deserializeAws_json1_1GetRepositoryCatalogDataCommand; +const deserializeAws_json1_1GetRepositoryCatalogDataCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecrpublic#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecrpublic#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecrpublic#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1GetRepositoryPolicyCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetRepositoryPolicyCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetRepositoryPolicyResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetRepositoryPolicyCommand = deserializeAws_json1_1GetRepositoryPolicyCommand; +const deserializeAws_json1_1GetRepositoryPolicyCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecrpublic#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecrpublic#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryPolicyNotFoundException": + case "com.amazonaws.ecrpublic#RepositoryPolicyNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryPolicyNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecrpublic#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1InitiateLayerUploadCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1InitiateLayerUploadCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1InitiateLayerUploadResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1InitiateLayerUploadCommand = deserializeAws_json1_1InitiateLayerUploadCommand; +const deserializeAws_json1_1InitiateLayerUploadCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecrpublic#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RegistryNotFoundException": + case "com.amazonaws.ecrpublic#RegistryNotFoundException": + response = { + ...(await deserializeAws_json1_1RegistryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecrpublic#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecrpublic#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnsupportedCommandException": + case "com.amazonaws.ecrpublic#UnsupportedCommandException": + response = { + ...(await deserializeAws_json1_1UnsupportedCommandExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1ListTagsForResourceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1ListTagsForResourceCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1ListTagsForResourceResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1ListTagsForResourceCommand = deserializeAws_json1_1ListTagsForResourceCommand; +const deserializeAws_json1_1ListTagsForResourceCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecrpublic#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecrpublic#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecrpublic#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1PutImageCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1PutImageCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1PutImageResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1PutImageCommand = deserializeAws_json1_1PutImageCommand; +const deserializeAws_json1_1PutImageCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ImageAlreadyExistsException": + case "com.amazonaws.ecrpublic#ImageAlreadyExistsException": + response = { + ...(await deserializeAws_json1_1ImageAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ImageDigestDoesNotMatchException": + case "com.amazonaws.ecrpublic#ImageDigestDoesNotMatchException": + response = { + ...(await deserializeAws_json1_1ImageDigestDoesNotMatchExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ImageTagAlreadyExistsException": + case "com.amazonaws.ecrpublic#ImageTagAlreadyExistsException": + response = { + ...(await deserializeAws_json1_1ImageTagAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.ecrpublic#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LayersNotFoundException": + case "com.amazonaws.ecrpublic#LayersNotFoundException": + response = { + ...(await deserializeAws_json1_1LayersNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.ecrpublic#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ReferencedImagesNotFoundException": + case "com.amazonaws.ecrpublic#ReferencedImagesNotFoundException": + response = { + ...(await deserializeAws_json1_1ReferencedImagesNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RegistryNotFoundException": + case "com.amazonaws.ecrpublic#RegistryNotFoundException": + response = { + ...(await deserializeAws_json1_1RegistryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecrpublic#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecrpublic#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnsupportedCommandException": + case "com.amazonaws.ecrpublic#UnsupportedCommandException": + response = { + ...(await deserializeAws_json1_1UnsupportedCommandExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1PutRegistryCatalogDataCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1PutRegistryCatalogDataCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1PutRegistryCatalogDataResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1PutRegistryCatalogDataCommand = deserializeAws_json1_1PutRegistryCatalogDataCommand; +const deserializeAws_json1_1PutRegistryCatalogDataCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecrpublic#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecrpublic#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnsupportedCommandException": + case "com.amazonaws.ecrpublic#UnsupportedCommandException": + response = { + ...(await deserializeAws_json1_1UnsupportedCommandExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1PutRepositoryCatalogDataCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1PutRepositoryCatalogDataCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1PutRepositoryCatalogDataResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1PutRepositoryCatalogDataCommand = deserializeAws_json1_1PutRepositoryCatalogDataCommand; +const deserializeAws_json1_1PutRepositoryCatalogDataCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecrpublic#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecrpublic#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecrpublic#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1SetRepositoryPolicyCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1SetRepositoryPolicyCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1SetRepositoryPolicyResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1SetRepositoryPolicyCommand = deserializeAws_json1_1SetRepositoryPolicyCommand; +const deserializeAws_json1_1SetRepositoryPolicyCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecrpublic#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecrpublic#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecrpublic#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1TagResourceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1TagResourceCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1TagResourceResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1TagResourceCommand = deserializeAws_json1_1TagResourceCommand; +const deserializeAws_json1_1TagResourceCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecrpublic#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidTagParameterException": + case "com.amazonaws.ecrpublic#InvalidTagParameterException": + response = { + ...(await deserializeAws_json1_1InvalidTagParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecrpublic#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecrpublic#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyTagsException": + case "com.amazonaws.ecrpublic#TooManyTagsException": + response = { + ...(await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1UntagResourceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1UntagResourceCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1UntagResourceResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1UntagResourceCommand = deserializeAws_json1_1UntagResourceCommand; +const deserializeAws_json1_1UntagResourceCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecrpublic#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidTagParameterException": + case "com.amazonaws.ecrpublic#InvalidTagParameterException": + response = { + ...(await deserializeAws_json1_1InvalidTagParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecrpublic#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecrpublic#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyTagsException": + case "com.amazonaws.ecrpublic#TooManyTagsException": + response = { + ...(await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1UploadLayerPartCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1UploadLayerPartCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1UploadLayerPartResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1UploadLayerPartCommand = deserializeAws_json1_1UploadLayerPartCommand; +const deserializeAws_json1_1UploadLayerPartCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidLayerPartException": + case "com.amazonaws.ecrpublic#InvalidLayerPartException": + response = { + ...(await deserializeAws_json1_1InvalidLayerPartExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.ecrpublic#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.ecrpublic#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RegistryNotFoundException": + case "com.amazonaws.ecrpublic#RegistryNotFoundException": + response = { + ...(await deserializeAws_json1_1RegistryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecrpublic#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecrpublic#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnsupportedCommandException": + case "com.amazonaws.ecrpublic#UnsupportedCommandException": + response = { + ...(await deserializeAws_json1_1UnsupportedCommandExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UploadNotFoundException": + case "com.amazonaws.ecrpublic#UploadNotFoundException": + response = { + ...(await deserializeAws_json1_1UploadNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1EmptyUploadExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1EmptyUploadException(body, context); + const contents = { + name: "EmptyUploadException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1ImageAlreadyExistsExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1ImageAlreadyExistsException(body, context); + const contents = { + name: "ImageAlreadyExistsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1ImageDigestDoesNotMatchExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1ImageDigestDoesNotMatchException(body, context); + const contents = { + name: "ImageDigestDoesNotMatchException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1ImageNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1ImageNotFoundException(body, context); + const contents = { + name: "ImageNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1ImageTagAlreadyExistsExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1ImageTagAlreadyExistsException(body, context); + const contents = { + name: "ImageTagAlreadyExistsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1InvalidLayerExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1InvalidLayerException(body, context); + const contents = { + name: "InvalidLayerException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1InvalidLayerPartExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1InvalidLayerPartException(body, context); + const contents = { + name: "InvalidLayerPartException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1InvalidParameterExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1InvalidParameterException(body, context); + const contents = { + name: "InvalidParameterException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1InvalidTagParameterExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1InvalidTagParameterException(body, context); + const contents = { + name: "InvalidTagParameterException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1LayerAlreadyExistsExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1LayerAlreadyExistsException(body, context); + const contents = { + name: "LayerAlreadyExistsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1LayerPartTooSmallExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1LayerPartTooSmallException(body, context); + const contents = { + name: "LayerPartTooSmallException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1LayersNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1LayersNotFoundException(body, context); + const contents = { + name: "LayersNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1LimitExceededExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1LimitExceededException(body, context); + const contents = { + name: "LimitExceededException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1ReferencedImagesNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1ReferencedImagesNotFoundException(body, context); + const contents = { + name: "ReferencedImagesNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1RegistryNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1RegistryNotFoundException(body, context); + const contents = { + name: "RegistryNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1RepositoryAlreadyExistsExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1RepositoryAlreadyExistsException(body, context); + const contents = { + name: "RepositoryAlreadyExistsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1RepositoryNotEmptyExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1RepositoryNotEmptyException(body, context); + const contents = { + name: "RepositoryNotEmptyException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1RepositoryNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1RepositoryNotFoundException(body, context); + const contents = { + name: "RepositoryNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1RepositoryPolicyNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1RepositoryPolicyNotFoundException(body, context); + const contents = { + name: "RepositoryPolicyNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1ServerExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1ServerException(body, context); + const contents = { + name: "ServerException", + $fault: "server", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1TooManyTagsExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1TooManyTagsException(body, context); + const contents = { + name: "TooManyTagsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1UnsupportedCommandExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1UnsupportedCommandException(body, context); + const contents = { + name: "UnsupportedCommandException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1UploadNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1UploadNotFoundException(body, context); + const contents = { + name: "UploadNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const serializeAws_json1_1ArchitectureList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1BatchCheckLayerAvailabilityRequest = (input, context) => { + return { + ...(input.layerDigests !== undefined && + input.layerDigests !== null && { + layerDigests: serializeAws_json1_1BatchedOperationLayerDigestList(input.layerDigests, context), + }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1BatchDeleteImageRequest = (input, context) => { + return { + ...(input.imageIds !== undefined && + input.imageIds !== null && { imageIds: serializeAws_json1_1ImageIdentifierList(input.imageIds, context) }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1BatchedOperationLayerDigestList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1CompleteLayerUploadRequest = (input, context) => { + return { + ...(input.layerDigests !== undefined && + input.layerDigests !== null && { + layerDigests: serializeAws_json1_1LayerDigestList(input.layerDigests, context), + }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + ...(input.uploadId !== undefined && input.uploadId !== null && { uploadId: input.uploadId }), + }; +}; +const serializeAws_json1_1CreateRepositoryRequest = (input, context) => { + return { + ...(input.catalogData !== undefined && + input.catalogData !== null && { + catalogData: serializeAws_json1_1RepositoryCatalogDataInput(input.catalogData, context), + }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1TagList(input.tags, context) }), + }; +}; +const serializeAws_json1_1DeleteRepositoryPolicyRequest = (input, context) => { + return { + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1DeleteRepositoryRequest = (input, context) => { + return { + ...(input.force !== undefined && input.force !== null && { force: input.force }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1DescribeImagesRequest = (input, context) => { + return { + ...(input.imageIds !== undefined && + input.imageIds !== null && { imageIds: serializeAws_json1_1ImageIdentifierList(input.imageIds, context) }), + ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }), + ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1DescribeImageTagsRequest = (input, context) => { + return { + ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }), + ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1DescribeRegistriesRequest = (input, context) => { + return { + ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }), + ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }), + }; +}; +const serializeAws_json1_1DescribeRepositoriesRequest = (input, context) => { + return { + ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }), + ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryNames !== undefined && + input.repositoryNames !== null && { + repositoryNames: serializeAws_json1_1RepositoryNameList(input.repositoryNames, context), + }), + }; +}; +const serializeAws_json1_1GetAuthorizationTokenRequest = (input, context) => { + return {}; +}; +const serializeAws_json1_1GetRegistryCatalogDataRequest = (input, context) => { + return {}; +}; +const serializeAws_json1_1GetRepositoryCatalogDataRequest = (input, context) => { + return { + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1GetRepositoryPolicyRequest = (input, context) => { + return { + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1ImageIdentifier = (input, context) => { + return { + ...(input.imageDigest !== undefined && input.imageDigest !== null && { imageDigest: input.imageDigest }), + ...(input.imageTag !== undefined && input.imageTag !== null && { imageTag: input.imageTag }), + }; +}; +const serializeAws_json1_1ImageIdentifierList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_json1_1ImageIdentifier(entry, context); + }); +}; +const serializeAws_json1_1InitiateLayerUploadRequest = (input, context) => { + return { + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1LayerDigestList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1ListTagsForResourceRequest = (input, context) => { + return { + ...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }), + }; +}; +const serializeAws_json1_1OperatingSystemList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1PutImageRequest = (input, context) => { + return { + ...(input.imageDigest !== undefined && input.imageDigest !== null && { imageDigest: input.imageDigest }), + ...(input.imageManifest !== undefined && input.imageManifest !== null && { imageManifest: input.imageManifest }), + ...(input.imageManifestMediaType !== undefined && + input.imageManifestMediaType !== null && { imageManifestMediaType: input.imageManifestMediaType }), + ...(input.imageTag !== undefined && input.imageTag !== null && { imageTag: input.imageTag }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1PutRegistryCatalogDataRequest = (input, context) => { + return { + ...(input.displayName !== undefined && input.displayName !== null && { displayName: input.displayName }), + }; +}; +const serializeAws_json1_1PutRepositoryCatalogDataRequest = (input, context) => { + return { + ...(input.catalogData !== undefined && + input.catalogData !== null && { + catalogData: serializeAws_json1_1RepositoryCatalogDataInput(input.catalogData, context), + }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1RepositoryCatalogDataInput = (input, context) => { + return { + ...(input.aboutText !== undefined && input.aboutText !== null && { aboutText: input.aboutText }), + ...(input.architectures !== undefined && + input.architectures !== null && { + architectures: serializeAws_json1_1ArchitectureList(input.architectures, context), + }), + ...(input.description !== undefined && input.description !== null && { description: input.description }), + ...(input.logoImageBlob !== undefined && + input.logoImageBlob !== null && { logoImageBlob: context.base64Encoder(input.logoImageBlob) }), + ...(input.operatingSystems !== undefined && + input.operatingSystems !== null && { + operatingSystems: serializeAws_json1_1OperatingSystemList(input.operatingSystems, context), + }), + ...(input.usageText !== undefined && input.usageText !== null && { usageText: input.usageText }), + }; +}; +const serializeAws_json1_1RepositoryNameList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1SetRepositoryPolicyRequest = (input, context) => { + return { + ...(input.force !== undefined && input.force !== null && { force: input.force }), + ...(input.policyText !== undefined && input.policyText !== null && { policyText: input.policyText }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1Tag = (input, context) => { + return { + ...(input.Key !== undefined && input.Key !== null && { Key: input.Key }), + ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }), + }; +}; +const serializeAws_json1_1TagKeyList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1TagList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_json1_1Tag(entry, context); + }); +}; +const serializeAws_json1_1TagResourceRequest = (input, context) => { + return { + ...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }), + ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1TagList(input.tags, context) }), + }; +}; +const serializeAws_json1_1UntagResourceRequest = (input, context) => { + return { + ...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }), + ...(input.tagKeys !== undefined && + input.tagKeys !== null && { tagKeys: serializeAws_json1_1TagKeyList(input.tagKeys, context) }), + }; +}; +const serializeAws_json1_1UploadLayerPartRequest = (input, context) => { + return { + ...(input.layerPartBlob !== undefined && + input.layerPartBlob !== null && { layerPartBlob: context.base64Encoder(input.layerPartBlob) }), + ...(input.partFirstByte !== undefined && input.partFirstByte !== null && { partFirstByte: input.partFirstByte }), + ...(input.partLastByte !== undefined && input.partLastByte !== null && { partLastByte: input.partLastByte }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + ...(input.uploadId !== undefined && input.uploadId !== null && { uploadId: input.uploadId }), + }; +}; +const deserializeAws_json1_1ArchitectureList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return smithy_client_1.expectString(entry); + }); +}; +const deserializeAws_json1_1AuthorizationData = (output, context) => { + return { + authorizationToken: smithy_client_1.expectString(output.authorizationToken), + expiresAt: output.expiresAt !== undefined && output.expiresAt !== null + ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.expiresAt))) + : undefined, + }; +}; +const deserializeAws_json1_1BatchCheckLayerAvailabilityResponse = (output, context) => { + return { + failures: output.failures !== undefined && output.failures !== null + ? deserializeAws_json1_1LayerFailureList(output.failures, context) + : undefined, + layers: output.layers !== undefined && output.layers !== null + ? deserializeAws_json1_1LayerList(output.layers, context) + : undefined, + }; +}; +const deserializeAws_json1_1BatchDeleteImageResponse = (output, context) => { + return { + failures: output.failures !== undefined && output.failures !== null + ? deserializeAws_json1_1ImageFailureList(output.failures, context) + : undefined, + imageIds: output.imageIds !== undefined && output.imageIds !== null + ? deserializeAws_json1_1ImageIdentifierList(output.imageIds, context) + : undefined, + }; +}; +const deserializeAws_json1_1CompleteLayerUploadResponse = (output, context) => { + return { + layerDigest: smithy_client_1.expectString(output.layerDigest), + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + uploadId: smithy_client_1.expectString(output.uploadId), + }; +}; +const deserializeAws_json1_1CreateRepositoryResponse = (output, context) => { + return { + catalogData: output.catalogData !== undefined && output.catalogData !== null + ? deserializeAws_json1_1RepositoryCatalogData(output.catalogData, context) + : undefined, + repository: output.repository !== undefined && output.repository !== null + ? deserializeAws_json1_1Repository(output.repository, context) + : undefined, + }; +}; +const deserializeAws_json1_1DeleteRepositoryPolicyResponse = (output, context) => { + return { + policyText: smithy_client_1.expectString(output.policyText), + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + }; +}; +const deserializeAws_json1_1DeleteRepositoryResponse = (output, context) => { + return { + repository: output.repository !== undefined && output.repository !== null + ? deserializeAws_json1_1Repository(output.repository, context) + : undefined, + }; +}; +const deserializeAws_json1_1DescribeImagesResponse = (output, context) => { + return { + imageDetails: output.imageDetails !== undefined && output.imageDetails !== null + ? deserializeAws_json1_1ImageDetailList(output.imageDetails, context) + : undefined, + nextToken: smithy_client_1.expectString(output.nextToken), + }; +}; +const deserializeAws_json1_1DescribeImageTagsResponse = (output, context) => { + return { + imageTagDetails: output.imageTagDetails !== undefined && output.imageTagDetails !== null + ? deserializeAws_json1_1ImageTagDetailList(output.imageTagDetails, context) + : undefined, + nextToken: smithy_client_1.expectString(output.nextToken), + }; +}; +const deserializeAws_json1_1DescribeRegistriesResponse = (output, context) => { + return { + nextToken: smithy_client_1.expectString(output.nextToken), + registries: output.registries !== undefined && output.registries !== null + ? deserializeAws_json1_1RegistryList(output.registries, context) + : undefined, + }; +}; +const deserializeAws_json1_1DescribeRepositoriesResponse = (output, context) => { + return { + nextToken: smithy_client_1.expectString(output.nextToken), + repositories: output.repositories !== undefined && output.repositories !== null + ? deserializeAws_json1_1RepositoryList(output.repositories, context) + : undefined, + }; +}; +const deserializeAws_json1_1EmptyUploadException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1GetAuthorizationTokenResponse = (output, context) => { + return { + authorizationData: output.authorizationData !== undefined && output.authorizationData !== null + ? deserializeAws_json1_1AuthorizationData(output.authorizationData, context) + : undefined, + }; +}; +const deserializeAws_json1_1GetRegistryCatalogDataResponse = (output, context) => { + return { + registryCatalogData: output.registryCatalogData !== undefined && output.registryCatalogData !== null + ? deserializeAws_json1_1RegistryCatalogData(output.registryCatalogData, context) + : undefined, + }; +}; +const deserializeAws_json1_1GetRepositoryCatalogDataResponse = (output, context) => { + return { + catalogData: output.catalogData !== undefined && output.catalogData !== null + ? deserializeAws_json1_1RepositoryCatalogData(output.catalogData, context) + : undefined, + }; +}; +const deserializeAws_json1_1GetRepositoryPolicyResponse = (output, context) => { + return { + policyText: smithy_client_1.expectString(output.policyText), + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + }; +}; +const deserializeAws_json1_1Image = (output, context) => { + return { + imageId: output.imageId !== undefined && output.imageId !== null + ? deserializeAws_json1_1ImageIdentifier(output.imageId, context) + : undefined, + imageManifest: smithy_client_1.expectString(output.imageManifest), + imageManifestMediaType: smithy_client_1.expectString(output.imageManifestMediaType), + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + }; +}; +const deserializeAws_json1_1ImageAlreadyExistsException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1ImageDetail = (output, context) => { + return { + artifactMediaType: smithy_client_1.expectString(output.artifactMediaType), + imageDigest: smithy_client_1.expectString(output.imageDigest), + imageManifestMediaType: smithy_client_1.expectString(output.imageManifestMediaType), + imagePushedAt: output.imagePushedAt !== undefined && output.imagePushedAt !== null + ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.imagePushedAt))) + : undefined, + imageSizeInBytes: smithy_client_1.expectLong(output.imageSizeInBytes), + imageTags: output.imageTags !== undefined && output.imageTags !== null + ? deserializeAws_json1_1ImageTagList(output.imageTags, context) + : undefined, + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + }; +}; +const deserializeAws_json1_1ImageDetailList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1ImageDetail(entry, context); + }); +}; +const deserializeAws_json1_1ImageDigestDoesNotMatchException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1ImageFailure = (output, context) => { + return { + failureCode: smithy_client_1.expectString(output.failureCode), + failureReason: smithy_client_1.expectString(output.failureReason), + imageId: output.imageId !== undefined && output.imageId !== null + ? deserializeAws_json1_1ImageIdentifier(output.imageId, context) + : undefined, + }; +}; +const deserializeAws_json1_1ImageFailureList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1ImageFailure(entry, context); + }); +}; +const deserializeAws_json1_1ImageIdentifier = (output, context) => { + return { + imageDigest: smithy_client_1.expectString(output.imageDigest), + imageTag: smithy_client_1.expectString(output.imageTag), + }; +}; +const deserializeAws_json1_1ImageIdentifierList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1ImageIdentifier(entry, context); + }); +}; +const deserializeAws_json1_1ImageNotFoundException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1ImageTagAlreadyExistsException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1ImageTagDetail = (output, context) => { + return { + createdAt: output.createdAt !== undefined && output.createdAt !== null + ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.createdAt))) + : undefined, + imageDetail: output.imageDetail !== undefined && output.imageDetail !== null + ? deserializeAws_json1_1ReferencedImageDetail(output.imageDetail, context) + : undefined, + imageTag: smithy_client_1.expectString(output.imageTag), + }; +}; +const deserializeAws_json1_1ImageTagDetailList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1ImageTagDetail(entry, context); + }); +}; +const deserializeAws_json1_1ImageTagList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return smithy_client_1.expectString(entry); + }); +}; +const deserializeAws_json1_1InitiateLayerUploadResponse = (output, context) => { + return { + partSize: smithy_client_1.expectLong(output.partSize), + uploadId: smithy_client_1.expectString(output.uploadId), + }; +}; +const deserializeAws_json1_1InvalidLayerException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1InvalidLayerPartException = (output, context) => { + return { + lastValidByteReceived: smithy_client_1.expectLong(output.lastValidByteReceived), + message: smithy_client_1.expectString(output.message), + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + uploadId: smithy_client_1.expectString(output.uploadId), + }; +}; +const deserializeAws_json1_1InvalidParameterException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1InvalidTagParameterException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1Layer = (output, context) => { + return { + layerAvailability: smithy_client_1.expectString(output.layerAvailability), + layerDigest: smithy_client_1.expectString(output.layerDigest), + layerSize: smithy_client_1.expectLong(output.layerSize), + mediaType: smithy_client_1.expectString(output.mediaType), + }; +}; +const deserializeAws_json1_1LayerAlreadyExistsException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1LayerFailure = (output, context) => { + return { + failureCode: smithy_client_1.expectString(output.failureCode), + failureReason: smithy_client_1.expectString(output.failureReason), + layerDigest: smithy_client_1.expectString(output.layerDigest), + }; +}; +const deserializeAws_json1_1LayerFailureList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1LayerFailure(entry, context); + }); +}; +const deserializeAws_json1_1LayerList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1Layer(entry, context); + }); +}; +const deserializeAws_json1_1LayerPartTooSmallException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1LayersNotFoundException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1LimitExceededException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1ListTagsForResourceResponse = (output, context) => { + return { + tags: output.tags !== undefined && output.tags !== null + ? deserializeAws_json1_1TagList(output.tags, context) + : undefined, + }; +}; +const deserializeAws_json1_1OperatingSystemList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return smithy_client_1.expectString(entry); + }); +}; +const deserializeAws_json1_1PutImageResponse = (output, context) => { + return { + image: output.image !== undefined && output.image !== null + ? deserializeAws_json1_1Image(output.image, context) + : undefined, + }; +}; +const deserializeAws_json1_1PutRegistryCatalogDataResponse = (output, context) => { + return { + registryCatalogData: output.registryCatalogData !== undefined && output.registryCatalogData !== null + ? deserializeAws_json1_1RegistryCatalogData(output.registryCatalogData, context) + : undefined, + }; +}; +const deserializeAws_json1_1PutRepositoryCatalogDataResponse = (output, context) => { + return { + catalogData: output.catalogData !== undefined && output.catalogData !== null + ? deserializeAws_json1_1RepositoryCatalogData(output.catalogData, context) + : undefined, + }; +}; +const deserializeAws_json1_1ReferencedImageDetail = (output, context) => { + return { + artifactMediaType: smithy_client_1.expectString(output.artifactMediaType), + imageDigest: smithy_client_1.expectString(output.imageDigest), + imageManifestMediaType: smithy_client_1.expectString(output.imageManifestMediaType), + imagePushedAt: output.imagePushedAt !== undefined && output.imagePushedAt !== null + ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.imagePushedAt))) + : undefined, + imageSizeInBytes: smithy_client_1.expectLong(output.imageSizeInBytes), + }; +}; +const deserializeAws_json1_1ReferencedImagesNotFoundException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1Registry = (output, context) => { + return { + aliases: output.aliases !== undefined && output.aliases !== null + ? deserializeAws_json1_1RegistryAliasList(output.aliases, context) + : undefined, + registryArn: smithy_client_1.expectString(output.registryArn), + registryId: smithy_client_1.expectString(output.registryId), + registryUri: smithy_client_1.expectString(output.registryUri), + verified: smithy_client_1.expectBoolean(output.verified), + }; +}; +const deserializeAws_json1_1RegistryAlias = (output, context) => { + return { + defaultRegistryAlias: smithy_client_1.expectBoolean(output.defaultRegistryAlias), + name: smithy_client_1.expectString(output.name), + primaryRegistryAlias: smithy_client_1.expectBoolean(output.primaryRegistryAlias), + status: smithy_client_1.expectString(output.status), + }; +}; +const deserializeAws_json1_1RegistryAliasList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1RegistryAlias(entry, context); + }); +}; +const deserializeAws_json1_1RegistryCatalogData = (output, context) => { + return { + displayName: smithy_client_1.expectString(output.displayName), + }; +}; +const deserializeAws_json1_1RegistryList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1Registry(entry, context); + }); +}; +const deserializeAws_json1_1RegistryNotFoundException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1Repository = (output, context) => { + return { + createdAt: output.createdAt !== undefined && output.createdAt !== null + ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.createdAt))) + : undefined, + registryId: smithy_client_1.expectString(output.registryId), + repositoryArn: smithy_client_1.expectString(output.repositoryArn), + repositoryName: smithy_client_1.expectString(output.repositoryName), + repositoryUri: smithy_client_1.expectString(output.repositoryUri), + }; +}; +const deserializeAws_json1_1RepositoryAlreadyExistsException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1RepositoryCatalogData = (output, context) => { + return { + aboutText: smithy_client_1.expectString(output.aboutText), + architectures: output.architectures !== undefined && output.architectures !== null + ? deserializeAws_json1_1ArchitectureList(output.architectures, context) + : undefined, + description: smithy_client_1.expectString(output.description), + logoUrl: smithy_client_1.expectString(output.logoUrl), + marketplaceCertified: smithy_client_1.expectBoolean(output.marketplaceCertified), + operatingSystems: output.operatingSystems !== undefined && output.operatingSystems !== null + ? deserializeAws_json1_1OperatingSystemList(output.operatingSystems, context) + : undefined, + usageText: smithy_client_1.expectString(output.usageText), + }; +}; +const deserializeAws_json1_1RepositoryList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1Repository(entry, context); + }); +}; +const deserializeAws_json1_1RepositoryNotEmptyException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1RepositoryNotFoundException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1RepositoryPolicyNotFoundException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1ServerException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1SetRepositoryPolicyResponse = (output, context) => { + return { + policyText: smithy_client_1.expectString(output.policyText), + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + }; +}; +const deserializeAws_json1_1Tag = (output, context) => { + return { + Key: smithy_client_1.expectString(output.Key), + Value: smithy_client_1.expectString(output.Value), + }; +}; +const deserializeAws_json1_1TagList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1Tag(entry, context); + }); +}; +const deserializeAws_json1_1TagResourceResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1TooManyTagsException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1UnsupportedCommandException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1UntagResourceResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1UploadLayerPartResponse = (output, context) => { + return { + lastByteReceived: smithy_client_1.expectLong(output.lastByteReceived), + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + uploadId: smithy_client_1.expectString(output.uploadId), + }; +}; +const deserializeAws_json1_1UploadNotFoundException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeMetadata = (output) => { + var _a; + return ({ + httpStatusCode: output.statusCode, + requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], + }); +}; +const collectBody = (streamBody = new Uint8Array(), context) => { + if (streamBody instanceof Uint8Array) { + return Promise.resolve(streamBody); + } + return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); +}; +const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const buildHttpRpcRequest = 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 !== undefined) { + contents.hostname = resolvedHostname; + } + if (body !== undefined) { + contents.body = body; + } + return new protocol_http_1.HttpRequest(contents); +}; +const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + return JSON.parse(encoded); + } + return {}; +}); +const loadRestJsonErrorCode = (output, data) => { + const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); + const sanitizeErrorCode = (rawValue) => { + let cleanValue = rawValue; + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + const headerKey = findKey(output.headers, "x-amzn-errortype"); + if (headerKey !== undefined) { + return sanitizeErrorCode(output.headers[headerKey]); + } + if (data.code !== undefined) { + return sanitizeErrorCode(data.code); + } + if (data["__type"] !== undefined) { + return sanitizeErrorCode(data["__type"]); + } + return ""; +}; - Runtime.prototype = { - callFunction: function(name, resolvedArgs) { - var functionEntry = this.functionTable[name]; - if (functionEntry === undefined) { - throw new Error("Unknown function: " + name + "()"); - } - this._validateArgs(name, resolvedArgs, functionEntry._signature); - return functionEntry._func.call(this, resolvedArgs); + +/***/ }), + +/***/ 9324: +/***/ ((__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__(6748)); +const client_sts_1 = __nccwpck_require__(2209); +const config_resolver_1 = __nccwpck_require__(6153); +const credential_provider_node_1 = __nccwpck_require__(5531); +const hash_node_1 = __nccwpck_require__(7442); +const middleware_retry_1 = __nccwpck_require__(6064); +const node_config_provider_1 = __nccwpck_require__(7684); +const node_http_handler_1 = __nccwpck_require__(8805); +const util_base64_node_1 = __nccwpck_require__(8588); +const util_body_length_node_1 = __nccwpck_require__(4147); +const util_user_agent_node_1 = __nccwpck_require__(8095); +const util_utf8_node_1 = __nccwpck_require__(6278); +const runtimeConfig_shared_1 = __nccwpck_require__(6746); +const smithy_client_1 = __nccwpck_require__(4963); +const getRuntimeConfig = (config) => { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q; + smithy_client_1.emitWarningIfUnsupportedVersion(process.version); + const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "node", + base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64, + base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64, + bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : client_sts_1.decorateDefaultCredentialProvider(credential_provider_node_1.defaultProvider), + defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : util_user_agent_node_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(), + retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig(middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS), + sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, "sha256"), + streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector, + useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), + utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : util_utf8_node_1.fromUtf8, + utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : util_utf8_node_1.toUtf8, + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; + + +/***/ }), + +/***/ 6746: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRuntimeConfig = void 0; +const url_parser_1 = __nccwpck_require__(2992); +const endpoints_1 = __nccwpck_require__(8593); +const getRuntimeConfig = (config) => { + var _a, _b, _c, _d, _e; + return ({ + apiVersion: "2020-10-30", + disableHostPrefix: (_a = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _a !== void 0 ? _a : false, + logger: (_b = config === null || config === void 0 ? void 0 : config.logger) !== null && _b !== void 0 ? _b : {}, + regionInfoProvider: (_c = config === null || config === void 0 ? void 0 : config.regionInfoProvider) !== null && _c !== void 0 ? _c : endpoints_1.defaultRegionInfoProvider, + serviceId: (_d = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _d !== void 0 ? _d : "ECR PUBLIC", + urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : url_parser_1.parseUrl, + }); +}; +exports.getRuntimeConfig = getRuntimeConfig; + + +/***/ }), + +/***/ 9167: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ECR = void 0; +const BatchCheckLayerAvailabilityCommand_1 = __nccwpck_require__(3804); +const BatchDeleteImageCommand_1 = __nccwpck_require__(5511); +const BatchGetImageCommand_1 = __nccwpck_require__(8859); +const BatchGetRepositoryScanningConfigurationCommand_1 = __nccwpck_require__(9728); +const CompleteLayerUploadCommand_1 = __nccwpck_require__(9003); +const CreatePullThroughCacheRuleCommand_1 = __nccwpck_require__(1454); +const CreateRepositoryCommand_1 = __nccwpck_require__(5074); +const DeleteLifecyclePolicyCommand_1 = __nccwpck_require__(8981); +const DeletePullThroughCacheRuleCommand_1 = __nccwpck_require__(3793); +const DeleteRegistryPolicyCommand_1 = __nccwpck_require__(1424); +const DeleteRepositoryCommand_1 = __nccwpck_require__(8651); +const DeleteRepositoryPolicyCommand_1 = __nccwpck_require__(6828); +const DescribeImageReplicationStatusCommand_1 = __nccwpck_require__(9694); +const DescribeImageScanFindingsCommand_1 = __nccwpck_require__(2987); +const DescribeImagesCommand_1 = __nccwpck_require__(5353); +const DescribePullThroughCacheRulesCommand_1 = __nccwpck_require__(1484); +const DescribeRegistryCommand_1 = __nccwpck_require__(6166); +const DescribeRepositoriesCommand_1 = __nccwpck_require__(1200); +const GetAuthorizationTokenCommand_1 = __nccwpck_require__(5828); +const GetDownloadUrlForLayerCommand_1 = __nccwpck_require__(1401); +const GetLifecyclePolicyCommand_1 = __nccwpck_require__(8469); +const GetLifecyclePolicyPreviewCommand_1 = __nccwpck_require__(7006); +const GetRegistryPolicyCommand_1 = __nccwpck_require__(3685); +const GetRegistryScanningConfigurationCommand_1 = __nccwpck_require__(2741); +const GetRepositoryPolicyCommand_1 = __nccwpck_require__(6330); +const InitiateLayerUploadCommand_1 = __nccwpck_require__(6936); +const ListImagesCommand_1 = __nccwpck_require__(3854); +const ListTagsForResourceCommand_1 = __nccwpck_require__(7403); +const PutImageCommand_1 = __nccwpck_require__(6844); +const PutImageScanningConfigurationCommand_1 = __nccwpck_require__(7935); +const PutImageTagMutabilityCommand_1 = __nccwpck_require__(6495); +const PutLifecyclePolicyCommand_1 = __nccwpck_require__(4444); +const PutRegistryPolicyCommand_1 = __nccwpck_require__(7928); +const PutRegistryScanningConfigurationCommand_1 = __nccwpck_require__(9529); +const PutReplicationConfigurationCommand_1 = __nccwpck_require__(3350); +const SetRepositoryPolicyCommand_1 = __nccwpck_require__(8300); +const StartImageScanCommand_1 = __nccwpck_require__(7984); +const StartLifecyclePolicyPreviewCommand_1 = __nccwpck_require__(5905); +const TagResourceCommand_1 = __nccwpck_require__(2665); +const UntagResourceCommand_1 = __nccwpck_require__(7225); +const UploadLayerPartCommand_1 = __nccwpck_require__(5825); +const ECRClient_1 = __nccwpck_require__(3391); +class ECR extends ECRClient_1.ECRClient { + batchCheckLayerAvailability(args, optionsOrCb, cb) { + const command = new BatchCheckLayerAvailabilityCommand_1.BatchCheckLayerAvailabilityCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + batchDeleteImage(args, optionsOrCb, cb) { + const command = new BatchDeleteImageCommand_1.BatchDeleteImageCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + batchGetImage(args, optionsOrCb, cb) { + const command = new BatchGetImageCommand_1.BatchGetImageCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + batchGetRepositoryScanningConfiguration(args, optionsOrCb, cb) { + const command = new BatchGetRepositoryScanningConfigurationCommand_1.BatchGetRepositoryScanningConfigurationCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + completeLayerUpload(args, optionsOrCb, cb) { + const command = new CompleteLayerUploadCommand_1.CompleteLayerUploadCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + createPullThroughCacheRule(args, optionsOrCb, cb) { + const command = new CreatePullThroughCacheRuleCommand_1.CreatePullThroughCacheRuleCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + createRepository(args, optionsOrCb, cb) { + const command = new CreateRepositoryCommand_1.CreateRepositoryCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + deleteLifecyclePolicy(args, optionsOrCb, cb) { + const command = new DeleteLifecyclePolicyCommand_1.DeleteLifecyclePolicyCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + deletePullThroughCacheRule(args, optionsOrCb, cb) { + const command = new DeletePullThroughCacheRuleCommand_1.DeletePullThroughCacheRuleCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + deleteRegistryPolicy(args, optionsOrCb, cb) { + const command = new DeleteRegistryPolicyCommand_1.DeleteRegistryPolicyCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + deleteRepository(args, optionsOrCb, cb) { + const command = new DeleteRepositoryCommand_1.DeleteRepositoryCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + deleteRepositoryPolicy(args, optionsOrCb, cb) { + const command = new DeleteRepositoryPolicyCommand_1.DeleteRepositoryPolicyCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + describeImageReplicationStatus(args, optionsOrCb, cb) { + const command = new DescribeImageReplicationStatusCommand_1.DescribeImageReplicationStatusCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + describeImages(args, optionsOrCb, cb) { + const command = new DescribeImagesCommand_1.DescribeImagesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + describeImageScanFindings(args, optionsOrCb, cb) { + const command = new DescribeImageScanFindingsCommand_1.DescribeImageScanFindingsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + describePullThroughCacheRules(args, optionsOrCb, cb) { + const command = new DescribePullThroughCacheRulesCommand_1.DescribePullThroughCacheRulesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + describeRegistry(args, optionsOrCb, cb) { + const command = new DescribeRegistryCommand_1.DescribeRegistryCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + describeRepositories(args, optionsOrCb, cb) { + const command = new DescribeRepositoriesCommand_1.DescribeRepositoriesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + getAuthorizationToken(args, optionsOrCb, cb) { + const command = new GetAuthorizationTokenCommand_1.GetAuthorizationTokenCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + getDownloadUrlForLayer(args, optionsOrCb, cb) { + const command = new GetDownloadUrlForLayerCommand_1.GetDownloadUrlForLayerCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + getLifecyclePolicy(args, optionsOrCb, cb) { + const command = new GetLifecyclePolicyCommand_1.GetLifecyclePolicyCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + getLifecyclePolicyPreview(args, optionsOrCb, cb) { + const command = new GetLifecyclePolicyPreviewCommand_1.GetLifecyclePolicyPreviewCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + getRegistryPolicy(args, optionsOrCb, cb) { + const command = new GetRegistryPolicyCommand_1.GetRegistryPolicyCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + getRegistryScanningConfiguration(args, optionsOrCb, cb) { + const command = new GetRegistryScanningConfigurationCommand_1.GetRegistryScanningConfigurationCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + getRepositoryPolicy(args, optionsOrCb, cb) { + const command = new GetRepositoryPolicyCommand_1.GetRepositoryPolicyCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + initiateLayerUpload(args, optionsOrCb, cb) { + const command = new InitiateLayerUploadCommand_1.InitiateLayerUploadCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + listImages(args, optionsOrCb, cb) { + const command = new ListImagesCommand_1.ListImagesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + listTagsForResource(args, optionsOrCb, cb) { + const command = new ListTagsForResourceCommand_1.ListTagsForResourceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + putImage(args, optionsOrCb, cb) { + const command = new PutImageCommand_1.PutImageCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + putImageScanningConfiguration(args, optionsOrCb, cb) { + const command = new PutImageScanningConfigurationCommand_1.PutImageScanningConfigurationCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + putImageTagMutability(args, optionsOrCb, cb) { + const command = new PutImageTagMutabilityCommand_1.PutImageTagMutabilityCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + putLifecyclePolicy(args, optionsOrCb, cb) { + const command = new PutLifecyclePolicyCommand_1.PutLifecyclePolicyCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + putRegistryPolicy(args, optionsOrCb, cb) { + const command = new PutRegistryPolicyCommand_1.PutRegistryPolicyCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + putRegistryScanningConfiguration(args, optionsOrCb, cb) { + const command = new PutRegistryScanningConfigurationCommand_1.PutRegistryScanningConfigurationCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + putReplicationConfiguration(args, optionsOrCb, cb) { + const command = new PutReplicationConfigurationCommand_1.PutReplicationConfigurationCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + setRepositoryPolicy(args, optionsOrCb, cb) { + const command = new SetRepositoryPolicyCommand_1.SetRepositoryPolicyCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + startImageScan(args, optionsOrCb, cb) { + const command = new StartImageScanCommand_1.StartImageScanCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + startLifecyclePolicyPreview(args, optionsOrCb, cb) { + const command = new StartLifecyclePolicyPreviewCommand_1.StartLifecyclePolicyPreviewCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + tagResource(args, optionsOrCb, cb) { + const command = new TagResourceCommand_1.TagResourceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + untagResource(args, optionsOrCb, cb) { + const command = new UntagResourceCommand_1.UntagResourceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + uploadLayerPart(args, optionsOrCb, cb) { + const command = new UploadLayerPartCommand_1.UploadLayerPartCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } +} +exports.ECR = ECR; + + +/***/ }), + +/***/ 3391: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ECRClient = void 0; +const config_resolver_1 = __nccwpck_require__(6153); +const middleware_content_length_1 = __nccwpck_require__(2245); +const middleware_host_header_1 = __nccwpck_require__(2545); +const middleware_logger_1 = __nccwpck_require__(14); +const middleware_retry_1 = __nccwpck_require__(6064); +const middleware_signing_1 = __nccwpck_require__(4935); +const middleware_user_agent_1 = __nccwpck_require__(4688); +const smithy_client_1 = __nccwpck_require__(4963); +const runtimeConfig_1 = __nccwpck_require__(869); +class ECRClient extends smithy_client_1.Client { + constructor(configuration) { + const _config_0 = runtimeConfig_1.getRuntimeConfig(configuration); + const _config_1 = config_resolver_1.resolveRegionConfig(_config_0); + const _config_2 = config_resolver_1.resolveEndpointsConfig(_config_1); + const _config_3 = middleware_retry_1.resolveRetryConfig(_config_2); + const _config_4 = middleware_host_header_1.resolveHostHeaderConfig(_config_3); + const _config_5 = middleware_signing_1.resolveAwsAuthConfig(_config_4); + const _config_6 = middleware_user_agent_1.resolveUserAgentConfig(_config_5); + super(_config_6); + this.config = _config_6; + this.middlewareStack.use(middleware_retry_1.getRetryPlugin(this.config)); + this.middlewareStack.use(middleware_content_length_1.getContentLengthPlugin(this.config)); + this.middlewareStack.use(middleware_host_header_1.getHostHeaderPlugin(this.config)); + this.middlewareStack.use(middleware_logger_1.getLoggerPlugin(this.config)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(this.config)); + this.middlewareStack.use(middleware_user_agent_1.getUserAgentPlugin(this.config)); + } + destroy() { + super.destroy(); + } +} +exports.ECRClient = ECRClient; + + +/***/ }), + +/***/ 3804: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BatchCheckLayerAvailabilityCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class BatchCheckLayerAvailabilityCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "BatchCheckLayerAvailabilityCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.BatchCheckLayerAvailabilityRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.BatchCheckLayerAvailabilityResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1BatchCheckLayerAvailabilityCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1BatchCheckLayerAvailabilityCommand(output, context); + } +} +exports.BatchCheckLayerAvailabilityCommand = BatchCheckLayerAvailabilityCommand; + + +/***/ }), + +/***/ 5511: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BatchDeleteImageCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class BatchDeleteImageCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "BatchDeleteImageCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.BatchDeleteImageRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.BatchDeleteImageResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1BatchDeleteImageCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1BatchDeleteImageCommand(output, context); + } +} +exports.BatchDeleteImageCommand = BatchDeleteImageCommand; + + +/***/ }), + +/***/ 8859: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BatchGetImageCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class BatchGetImageCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "BatchGetImageCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.BatchGetImageRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.BatchGetImageResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1BatchGetImageCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1BatchGetImageCommand(output, context); + } +} +exports.BatchGetImageCommand = BatchGetImageCommand; + + +/***/ }), + +/***/ 9728: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BatchGetRepositoryScanningConfigurationCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class BatchGetRepositoryScanningConfigurationCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "BatchGetRepositoryScanningConfigurationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.BatchGetRepositoryScanningConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.BatchGetRepositoryScanningConfigurationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1BatchGetRepositoryScanningConfigurationCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1BatchGetRepositoryScanningConfigurationCommand(output, context); + } +} +exports.BatchGetRepositoryScanningConfigurationCommand = BatchGetRepositoryScanningConfigurationCommand; + + +/***/ }), + +/***/ 9003: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CompleteLayerUploadCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class CompleteLayerUploadCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "CompleteLayerUploadCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CompleteLayerUploadRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CompleteLayerUploadResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1CompleteLayerUploadCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1CompleteLayerUploadCommand(output, context); + } +} +exports.CompleteLayerUploadCommand = CompleteLayerUploadCommand; + + +/***/ }), + +/***/ 1454: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreatePullThroughCacheRuleCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class CreatePullThroughCacheRuleCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "CreatePullThroughCacheRuleCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreatePullThroughCacheRuleRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreatePullThroughCacheRuleResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1CreatePullThroughCacheRuleCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1CreatePullThroughCacheRuleCommand(output, context); + } +} +exports.CreatePullThroughCacheRuleCommand = CreatePullThroughCacheRuleCommand; + + +/***/ }), + +/***/ 5074: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateRepositoryCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class CreateRepositoryCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "CreateRepositoryCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.CreateRepositoryRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.CreateRepositoryResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1CreateRepositoryCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1CreateRepositoryCommand(output, context); + } +} +exports.CreateRepositoryCommand = CreateRepositoryCommand; + + +/***/ }), + +/***/ 8981: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteLifecyclePolicyCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class DeleteLifecyclePolicyCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "DeleteLifecyclePolicyCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteLifecyclePolicyRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteLifecyclePolicyResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DeleteLifecyclePolicyCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DeleteLifecyclePolicyCommand(output, context); + } +} +exports.DeleteLifecyclePolicyCommand = DeleteLifecyclePolicyCommand; + + +/***/ }), + +/***/ 3793: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeletePullThroughCacheRuleCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class DeletePullThroughCacheRuleCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "DeletePullThroughCacheRuleCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeletePullThroughCacheRuleRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeletePullThroughCacheRuleResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DeletePullThroughCacheRuleCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DeletePullThroughCacheRuleCommand(output, context); + } +} +exports.DeletePullThroughCacheRuleCommand = DeletePullThroughCacheRuleCommand; + + +/***/ }), + +/***/ 1424: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteRegistryPolicyCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class DeleteRegistryPolicyCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "DeleteRegistryPolicyCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteRegistryPolicyRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteRegistryPolicyResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DeleteRegistryPolicyCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DeleteRegistryPolicyCommand(output, context); + } +} +exports.DeleteRegistryPolicyCommand = DeleteRegistryPolicyCommand; + + +/***/ }), + +/***/ 8651: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteRepositoryCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class DeleteRepositoryCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "DeleteRepositoryCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteRepositoryRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteRepositoryResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DeleteRepositoryCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DeleteRepositoryCommand(output, context); + } +} +exports.DeleteRepositoryCommand = DeleteRepositoryCommand; + + +/***/ }), + +/***/ 6828: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteRepositoryPolicyCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class DeleteRepositoryPolicyCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "DeleteRepositoryPolicyCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DeleteRepositoryPolicyRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DeleteRepositoryPolicyResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DeleteRepositoryPolicyCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DeleteRepositoryPolicyCommand(output, context); + } +} +exports.DeleteRepositoryPolicyCommand = DeleteRepositoryPolicyCommand; + + +/***/ }), + +/***/ 9694: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeImageReplicationStatusCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class DescribeImageReplicationStatusCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "DescribeImageReplicationStatusCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeImageReplicationStatusRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeImageReplicationStatusResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DescribeImageReplicationStatusCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DescribeImageReplicationStatusCommand(output, context); + } +} +exports.DescribeImageReplicationStatusCommand = DescribeImageReplicationStatusCommand; + + +/***/ }), + +/***/ 2987: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeImageScanFindingsCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class DescribeImageScanFindingsCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "DescribeImageScanFindingsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeImageScanFindingsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeImageScanFindingsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DescribeImageScanFindingsCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DescribeImageScanFindingsCommand(output, context); + } +} +exports.DescribeImageScanFindingsCommand = DescribeImageScanFindingsCommand; + + +/***/ }), + +/***/ 5353: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeImagesCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class DescribeImagesCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "DescribeImagesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeImagesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeImagesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DescribeImagesCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DescribeImagesCommand(output, context); + } +} +exports.DescribeImagesCommand = DescribeImagesCommand; + + +/***/ }), + +/***/ 1484: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribePullThroughCacheRulesCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class DescribePullThroughCacheRulesCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "DescribePullThroughCacheRulesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribePullThroughCacheRulesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribePullThroughCacheRulesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DescribePullThroughCacheRulesCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DescribePullThroughCacheRulesCommand(output, context); + } +} +exports.DescribePullThroughCacheRulesCommand = DescribePullThroughCacheRulesCommand; + + +/***/ }), + +/***/ 6166: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeRegistryCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class DescribeRegistryCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "DescribeRegistryCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeRegistryRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeRegistryResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DescribeRegistryCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DescribeRegistryCommand(output, context); + } +} +exports.DescribeRegistryCommand = DescribeRegistryCommand; + + +/***/ }), + +/***/ 1200: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DescribeRepositoriesCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class DescribeRepositoriesCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "DescribeRepositoriesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DescribeRepositoriesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DescribeRepositoriesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1DescribeRepositoriesCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1DescribeRepositoriesCommand(output, context); + } +} +exports.DescribeRepositoriesCommand = DescribeRepositoriesCommand; + + +/***/ }), + +/***/ 5828: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetAuthorizationTokenCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class GetAuthorizationTokenCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "GetAuthorizationTokenCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetAuthorizationTokenRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetAuthorizationTokenResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetAuthorizationTokenCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetAuthorizationTokenCommand(output, context); + } +} +exports.GetAuthorizationTokenCommand = GetAuthorizationTokenCommand; + + +/***/ }), + +/***/ 1401: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetDownloadUrlForLayerCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class GetDownloadUrlForLayerCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "GetDownloadUrlForLayerCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetDownloadUrlForLayerRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetDownloadUrlForLayerResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetDownloadUrlForLayerCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetDownloadUrlForLayerCommand(output, context); + } +} +exports.GetDownloadUrlForLayerCommand = GetDownloadUrlForLayerCommand; + + +/***/ }), + +/***/ 8469: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetLifecyclePolicyCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class GetLifecyclePolicyCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "GetLifecyclePolicyCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetLifecyclePolicyRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetLifecyclePolicyResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetLifecyclePolicyCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetLifecyclePolicyCommand(output, context); + } +} +exports.GetLifecyclePolicyCommand = GetLifecyclePolicyCommand; + + +/***/ }), + +/***/ 7006: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetLifecyclePolicyPreviewCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class GetLifecyclePolicyPreviewCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "GetLifecyclePolicyPreviewCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetLifecyclePolicyPreviewRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetLifecyclePolicyPreviewResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetLifecyclePolicyPreviewCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetLifecyclePolicyPreviewCommand(output, context); + } +} +exports.GetLifecyclePolicyPreviewCommand = GetLifecyclePolicyPreviewCommand; + + +/***/ }), + +/***/ 3685: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetRegistryPolicyCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class GetRegistryPolicyCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "GetRegistryPolicyCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetRegistryPolicyRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetRegistryPolicyResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetRegistryPolicyCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetRegistryPolicyCommand(output, context); + } +} +exports.GetRegistryPolicyCommand = GetRegistryPolicyCommand; + + +/***/ }), + +/***/ 2741: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetRegistryScanningConfigurationCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class GetRegistryScanningConfigurationCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "GetRegistryScanningConfigurationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetRegistryScanningConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetRegistryScanningConfigurationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetRegistryScanningConfigurationCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetRegistryScanningConfigurationCommand(output, context); + } +} +exports.GetRegistryScanningConfigurationCommand = GetRegistryScanningConfigurationCommand; + + +/***/ }), + +/***/ 6330: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetRepositoryPolicyCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class GetRepositoryPolicyCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "GetRepositoryPolicyCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetRepositoryPolicyRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetRepositoryPolicyResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1GetRepositoryPolicyCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1GetRepositoryPolicyCommand(output, context); + } +} +exports.GetRepositoryPolicyCommand = GetRepositoryPolicyCommand; + + +/***/ }), + +/***/ 6936: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.InitiateLayerUploadCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class InitiateLayerUploadCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "InitiateLayerUploadCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.InitiateLayerUploadRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.InitiateLayerUploadResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1InitiateLayerUploadCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1InitiateLayerUploadCommand(output, context); + } +} +exports.InitiateLayerUploadCommand = InitiateLayerUploadCommand; + + +/***/ }), + +/***/ 3854: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListImagesCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class ListImagesCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "ListImagesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListImagesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListImagesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1ListImagesCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1ListImagesCommand(output, context); + } +} +exports.ListImagesCommand = ListImagesCommand; + + +/***/ }), + +/***/ 7403: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListTagsForResourceCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class ListTagsForResourceCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "ListTagsForResourceCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListTagsForResourceRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListTagsForResourceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1ListTagsForResourceCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1ListTagsForResourceCommand(output, context); + } +} +exports.ListTagsForResourceCommand = ListTagsForResourceCommand; + + +/***/ }), + +/***/ 6844: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PutImageCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class PutImageCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "PutImageCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.PutImageRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.PutImageResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1PutImageCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1PutImageCommand(output, context); + } +} +exports.PutImageCommand = PutImageCommand; + + +/***/ }), + +/***/ 7935: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PutImageScanningConfigurationCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class PutImageScanningConfigurationCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "PutImageScanningConfigurationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.PutImageScanningConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.PutImageScanningConfigurationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1PutImageScanningConfigurationCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1PutImageScanningConfigurationCommand(output, context); + } +} +exports.PutImageScanningConfigurationCommand = PutImageScanningConfigurationCommand; + + +/***/ }), + +/***/ 6495: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PutImageTagMutabilityCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class PutImageTagMutabilityCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "PutImageTagMutabilityCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.PutImageTagMutabilityRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.PutImageTagMutabilityResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1PutImageTagMutabilityCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1PutImageTagMutabilityCommand(output, context); + } +} +exports.PutImageTagMutabilityCommand = PutImageTagMutabilityCommand; + + +/***/ }), + +/***/ 4444: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PutLifecyclePolicyCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class PutLifecyclePolicyCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "PutLifecyclePolicyCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.PutLifecyclePolicyRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.PutLifecyclePolicyResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1PutLifecyclePolicyCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1PutLifecyclePolicyCommand(output, context); + } +} +exports.PutLifecyclePolicyCommand = PutLifecyclePolicyCommand; + + +/***/ }), + +/***/ 7928: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PutRegistryPolicyCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class PutRegistryPolicyCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "PutRegistryPolicyCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.PutRegistryPolicyRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.PutRegistryPolicyResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1PutRegistryPolicyCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1PutRegistryPolicyCommand(output, context); + } +} +exports.PutRegistryPolicyCommand = PutRegistryPolicyCommand; + + +/***/ }), + +/***/ 9529: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PutRegistryScanningConfigurationCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class PutRegistryScanningConfigurationCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "PutRegistryScanningConfigurationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.PutRegistryScanningConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.PutRegistryScanningConfigurationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1PutRegistryScanningConfigurationCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1PutRegistryScanningConfigurationCommand(output, context); + } +} +exports.PutRegistryScanningConfigurationCommand = PutRegistryScanningConfigurationCommand; + + +/***/ }), + +/***/ 3350: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PutReplicationConfigurationCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class PutReplicationConfigurationCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "PutReplicationConfigurationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.PutReplicationConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.PutReplicationConfigurationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1PutReplicationConfigurationCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1PutReplicationConfigurationCommand(output, context); + } +} +exports.PutReplicationConfigurationCommand = PutReplicationConfigurationCommand; + + +/***/ }), + +/***/ 8300: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SetRepositoryPolicyCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class SetRepositoryPolicyCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "SetRepositoryPolicyCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.SetRepositoryPolicyRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.SetRepositoryPolicyResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1SetRepositoryPolicyCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1SetRepositoryPolicyCommand(output, context); + } +} +exports.SetRepositoryPolicyCommand = SetRepositoryPolicyCommand; + + +/***/ }), + +/***/ 7984: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StartImageScanCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class StartImageScanCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "StartImageScanCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.StartImageScanRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.StartImageScanResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1StartImageScanCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1StartImageScanCommand(output, context); + } +} +exports.StartImageScanCommand = StartImageScanCommand; + + +/***/ }), + +/***/ 5905: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StartLifecyclePolicyPreviewCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class StartLifecyclePolicyPreviewCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "StartLifecyclePolicyPreviewCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.StartLifecyclePolicyPreviewRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.StartLifecyclePolicyPreviewResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1StartLifecyclePolicyPreviewCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1StartLifecyclePolicyPreviewCommand(output, context); + } +} +exports.StartLifecyclePolicyPreviewCommand = StartLifecyclePolicyPreviewCommand; + + +/***/ }), + +/***/ 2665: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TagResourceCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class TagResourceCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "TagResourceCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.TagResourceRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.TagResourceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1TagResourceCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1TagResourceCommand(output, context); + } +} +exports.TagResourceCommand = TagResourceCommand; + + +/***/ }), + +/***/ 7225: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UntagResourceCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class UntagResourceCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "UntagResourceCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.UntagResourceRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.UntagResourceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1UntagResourceCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1UntagResourceCommand(output, context); + } +} +exports.UntagResourceCommand = UntagResourceCommand; + + +/***/ }), + +/***/ 5825: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UploadLayerPartCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(9088); +const Aws_json1_1_1 = __nccwpck_require__(6704); +class UploadLayerPartCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "ECRClient"; + const commandName = "UploadLayerPartCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.UploadLayerPartRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.UploadLayerPartResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_json1_1_1.serializeAws_json1_1UploadLayerPartCommand(input, context); + } + deserialize(output, context) { + return Aws_json1_1_1.deserializeAws_json1_1UploadLayerPartCommand(output, context); + } +} +exports.UploadLayerPartCommand = UploadLayerPartCommand; + + +/***/ }), + +/***/ 7407: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(3804), exports); +tslib_1.__exportStar(__nccwpck_require__(5511), exports); +tslib_1.__exportStar(__nccwpck_require__(8859), exports); +tslib_1.__exportStar(__nccwpck_require__(9728), exports); +tslib_1.__exportStar(__nccwpck_require__(9003), exports); +tslib_1.__exportStar(__nccwpck_require__(1454), exports); +tslib_1.__exportStar(__nccwpck_require__(5074), exports); +tslib_1.__exportStar(__nccwpck_require__(8981), exports); +tslib_1.__exportStar(__nccwpck_require__(3793), exports); +tslib_1.__exportStar(__nccwpck_require__(1424), exports); +tslib_1.__exportStar(__nccwpck_require__(8651), exports); +tslib_1.__exportStar(__nccwpck_require__(6828), exports); +tslib_1.__exportStar(__nccwpck_require__(9694), exports); +tslib_1.__exportStar(__nccwpck_require__(2987), exports); +tslib_1.__exportStar(__nccwpck_require__(5353), exports); +tslib_1.__exportStar(__nccwpck_require__(1484), exports); +tslib_1.__exportStar(__nccwpck_require__(6166), exports); +tslib_1.__exportStar(__nccwpck_require__(1200), exports); +tslib_1.__exportStar(__nccwpck_require__(5828), exports); +tslib_1.__exportStar(__nccwpck_require__(1401), exports); +tslib_1.__exportStar(__nccwpck_require__(8469), exports); +tslib_1.__exportStar(__nccwpck_require__(7006), exports); +tslib_1.__exportStar(__nccwpck_require__(3685), exports); +tslib_1.__exportStar(__nccwpck_require__(2741), exports); +tslib_1.__exportStar(__nccwpck_require__(6330), exports); +tslib_1.__exportStar(__nccwpck_require__(6936), exports); +tslib_1.__exportStar(__nccwpck_require__(3854), exports); +tslib_1.__exportStar(__nccwpck_require__(7403), exports); +tslib_1.__exportStar(__nccwpck_require__(6844), exports); +tslib_1.__exportStar(__nccwpck_require__(7935), exports); +tslib_1.__exportStar(__nccwpck_require__(6495), exports); +tslib_1.__exportStar(__nccwpck_require__(4444), exports); +tslib_1.__exportStar(__nccwpck_require__(7928), exports); +tslib_1.__exportStar(__nccwpck_require__(9529), exports); +tslib_1.__exportStar(__nccwpck_require__(3350), exports); +tslib_1.__exportStar(__nccwpck_require__(8300), exports); +tslib_1.__exportStar(__nccwpck_require__(7984), exports); +tslib_1.__exportStar(__nccwpck_require__(5905), exports); +tslib_1.__exportStar(__nccwpck_require__(2665), exports); +tslib_1.__exportStar(__nccwpck_require__(7225), exports); +tslib_1.__exportStar(__nccwpck_require__(5825), exports); + + +/***/ }), + +/***/ 3070: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultRegionInfoProvider = void 0; +const config_resolver_1 = __nccwpck_require__(6153); +const regionHash = { + "af-south-1": { + variants: [ + { + hostname: "api.ecr.af-south-1.amazonaws.com", + tags: [], + }, + ], + signingRegion: "af-south-1", }, - - _validateArgs: function(name, args, signature) { - // Validating the args requires validating - // the correct arity and the correct type of each arg. - // If the last argument is declared as variadic, then we need - // a minimum number of args to be required. Otherwise it has to - // be an exact amount. - var pluralized; - if (signature[signature.length - 1].variadic) { - if (args.length < signature.length) { - pluralized = signature.length === 1 ? " argument" : " arguments"; - throw new Error("ArgumentError: " + name + "() " + - "takes at least" + signature.length + pluralized + - " but received " + args.length); - } - } else if (args.length !== signature.length) { - pluralized = signature.length === 1 ? " argument" : " arguments"; - throw new Error("ArgumentError: " + name + "() " + - "takes " + signature.length + pluralized + - " but received " + args.length); - } - var currentSpec; - var actualType; - var typeMatched; - for (var i = 0; i < signature.length; i++) { - typeMatched = false; - currentSpec = signature[i].types; - actualType = this._getTypeName(args[i]); - for (var j = 0; j < currentSpec.length; j++) { - if (this._typeMatches(actualType, currentSpec[j], args[i])) { - typeMatched = true; - break; - } - } - if (!typeMatched) { - throw new Error("TypeError: " + name + "() " + - "expected argument " + (i + 1) + - " to be type " + currentSpec + - " but received type " + actualType + - " instead."); - } - } + "ap-east-1": { + variants: [ + { + hostname: "api.ecr.ap-east-1.amazonaws.com", + tags: [], + }, + ], + signingRegion: "ap-east-1", }, + "ap-northeast-1": { + variants: [ + { + hostname: "api.ecr.ap-northeast-1.amazonaws.com", + tags: [], + }, + ], + signingRegion: "ap-northeast-1", + }, + "ap-northeast-2": { + variants: [ + { + hostname: "api.ecr.ap-northeast-2.amazonaws.com", + tags: [], + }, + ], + signingRegion: "ap-northeast-2", + }, + "ap-northeast-3": { + variants: [ + { + hostname: "api.ecr.ap-northeast-3.amazonaws.com", + tags: [], + }, + ], + signingRegion: "ap-northeast-3", + }, + "ap-south-1": { + variants: [ + { + hostname: "api.ecr.ap-south-1.amazonaws.com", + tags: [], + }, + ], + signingRegion: "ap-south-1", + }, + "ap-southeast-1": { + variants: [ + { + hostname: "api.ecr.ap-southeast-1.amazonaws.com", + tags: [], + }, + ], + signingRegion: "ap-southeast-1", + }, + "ap-southeast-2": { + variants: [ + { + hostname: "api.ecr.ap-southeast-2.amazonaws.com", + tags: [], + }, + ], + signingRegion: "ap-southeast-2", + }, + "ca-central-1": { + variants: [ + { + hostname: "api.ecr.ca-central-1.amazonaws.com", + tags: [], + }, + ], + signingRegion: "ca-central-1", + }, + "cn-north-1": { + variants: [ + { + hostname: "api.ecr.cn-north-1.amazonaws.com.cn", + tags: [], + }, + ], + signingRegion: "cn-north-1", + }, + "cn-northwest-1": { + variants: [ + { + hostname: "api.ecr.cn-northwest-1.amazonaws.com.cn", + tags: [], + }, + ], + signingRegion: "cn-northwest-1", + }, + "eu-central-1": { + variants: [ + { + hostname: "api.ecr.eu-central-1.amazonaws.com", + tags: [], + }, + ], + signingRegion: "eu-central-1", + }, + "eu-north-1": { + variants: [ + { + hostname: "api.ecr.eu-north-1.amazonaws.com", + tags: [], + }, + ], + signingRegion: "eu-north-1", + }, + "eu-south-1": { + variants: [ + { + hostname: "api.ecr.eu-south-1.amazonaws.com", + tags: [], + }, + ], + signingRegion: "eu-south-1", + }, + "eu-west-1": { + variants: [ + { + hostname: "api.ecr.eu-west-1.amazonaws.com", + tags: [], + }, + ], + signingRegion: "eu-west-1", + }, + "eu-west-2": { + variants: [ + { + hostname: "api.ecr.eu-west-2.amazonaws.com", + tags: [], + }, + ], + signingRegion: "eu-west-2", + }, + "eu-west-3": { + variants: [ + { + hostname: "api.ecr.eu-west-3.amazonaws.com", + tags: [], + }, + ], + signingRegion: "eu-west-3", + }, + "me-south-1": { + variants: [ + { + hostname: "api.ecr.me-south-1.amazonaws.com", + tags: [], + }, + ], + signingRegion: "me-south-1", + }, + "sa-east-1": { + variants: [ + { + hostname: "api.ecr.sa-east-1.amazonaws.com", + tags: [], + }, + ], + signingRegion: "sa-east-1", + }, + "us-east-1": { + variants: [ + { + hostname: "api.ecr.us-east-1.amazonaws.com", + tags: [], + }, + { + hostname: "ecr-fips.us-east-1.amazonaws.com", + tags: ["fips"], + }, + ], + signingRegion: "us-east-1", + }, + "us-east-2": { + variants: [ + { + hostname: "api.ecr.us-east-2.amazonaws.com", + tags: [], + }, + { + hostname: "ecr-fips.us-east-2.amazonaws.com", + tags: ["fips"], + }, + ], + signingRegion: "us-east-2", + }, + "us-gov-east-1": { + variants: [ + { + hostname: "api.ecr.us-gov-east-1.amazonaws.com", + tags: [], + }, + { + hostname: "ecr-fips.us-gov-east-1.amazonaws.com", + tags: ["fips"], + }, + ], + signingRegion: "us-gov-east-1", + }, + "us-gov-west-1": { + variants: [ + { + hostname: "api.ecr.us-gov-west-1.amazonaws.com", + tags: [], + }, + { + hostname: "ecr-fips.us-gov-west-1.amazonaws.com", + tags: ["fips"], + }, + ], + signingRegion: "us-gov-west-1", + }, + "us-iso-east-1": { + variants: [ + { + hostname: "api.ecr.us-iso-east-1.c2s.ic.gov", + tags: [], + }, + ], + signingRegion: "us-iso-east-1", + }, + "us-iso-west-1": { + variants: [ + { + hostname: "api.ecr.us-iso-west-1.c2s.ic.gov", + tags: [], + }, + ], + signingRegion: "us-iso-west-1", + }, + "us-isob-east-1": { + variants: [ + { + hostname: "api.ecr.us-isob-east-1.sc2s.sgov.gov", + tags: [], + }, + ], + signingRegion: "us-isob-east-1", + }, + "us-west-1": { + variants: [ + { + hostname: "api.ecr.us-west-1.amazonaws.com", + tags: [], + }, + { + hostname: "ecr-fips.us-west-1.amazonaws.com", + tags: ["fips"], + }, + ], + signingRegion: "us-west-1", + }, + "us-west-2": { + variants: [ + { + hostname: "api.ecr.us-west-2.amazonaws.com", + tags: [], + }, + { + hostname: "ecr-fips.us-west-2.amazonaws.com", + tags: ["fips"], + }, + ], + signingRegion: "us-west-2", + }, +}; +const partitionHash = { + aws: { + regions: [ + "af-south-1", + "ap-east-1", + "ap-northeast-1", + "ap-northeast-2", + "ap-northeast-3", + "ap-south-1", + "ap-southeast-1", + "ap-southeast-2", + "ca-central-1", + "dkr-us-east-1", + "dkr-us-east-2", + "dkr-us-west-1", + "dkr-us-west-2", + "eu-central-1", + "eu-north-1", + "eu-south-1", + "eu-west-1", + "eu-west-2", + "eu-west-3", + "fips-dkr-us-east-1", + "fips-dkr-us-east-2", + "fips-dkr-us-west-1", + "fips-dkr-us-west-2", + "fips-us-east-1", + "fips-us-east-2", + "fips-us-west-1", + "fips-us-west-2", + "me-south-1", + "sa-east-1", + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2", + ], + regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "api.ecr.{region}.amazonaws.com", + tags: [], + }, + { + hostname: "ecr-fips.{region}.amazonaws.com", + tags: ["fips"], + }, + { + hostname: "api.ecr-fips.{region}.api.aws", + tags: ["dualstack", "fips"], + }, + { + hostname: "api.ecr.{region}.api.aws", + tags: ["dualstack"], + }, + ], + }, + "aws-cn": { + regions: ["cn-north-1", "cn-northwest-1"], + regionRegex: "^cn\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "api.ecr.{region}.amazonaws.com.cn", + tags: [], + }, + { + hostname: "api.ecr-fips.{region}.amazonaws.com.cn", + tags: ["fips"], + }, + { + hostname: "api.ecr-fips.{region}.api.amazonwebservices.com.cn", + tags: ["dualstack", "fips"], + }, + { + hostname: "api.ecr.{region}.api.amazonwebservices.com.cn", + tags: ["dualstack"], + }, + ], + }, + "aws-iso": { + regions: ["us-iso-east-1", "us-iso-west-1"], + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "api.ecr.{region}.c2s.ic.gov", + tags: [], + }, + { + hostname: "api.ecr-fips.{region}.c2s.ic.gov", + tags: ["fips"], + }, + ], + }, + "aws-iso-b": { + regions: ["us-isob-east-1"], + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "api.ecr.{region}.sc2s.sgov.gov", + tags: [], + }, + { + hostname: "api.ecr-fips.{region}.sc2s.sgov.gov", + tags: ["fips"], + }, + ], + }, + "aws-us-gov": { + regions: [ + "dkr-us-gov-east-1", + "dkr-us-gov-west-1", + "fips-dkr-us-gov-east-1", + "fips-dkr-us-gov-west-1", + "fips-us-gov-east-1", + "fips-us-gov-west-1", + "us-gov-east-1", + "us-gov-west-1", + ], + regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "api.ecr.{region}.amazonaws.com", + tags: [], + }, + { + hostname: "ecr-fips.{region}.amazonaws.com", + tags: ["fips"], + }, + { + hostname: "api.ecr-fips.{region}.api.aws", + tags: ["dualstack", "fips"], + }, + { + hostname: "api.ecr.{region}.api.aws", + tags: ["dualstack"], + }, + ], + }, +}; +const defaultRegionInfoProvider = async (region, options) => config_resolver_1.getRegionInfo(region, { + ...options, + signingService: "ecr", + regionHash, + partitionHash, +}); +exports.defaultRegionInfoProvider = defaultRegionInfoProvider; - _typeMatches: function(actual, expected, argValue) { - if (expected === TYPE_ANY) { - return true; + +/***/ }), + +/***/ 8923: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(9167), exports); +tslib_1.__exportStar(__nccwpck_require__(3391), exports); +tslib_1.__exportStar(__nccwpck_require__(7407), exports); +tslib_1.__exportStar(__nccwpck_require__(4692), exports); +tslib_1.__exportStar(__nccwpck_require__(5356), exports); +tslib_1.__exportStar(__nccwpck_require__(8406), exports); + + +/***/ }), + +/***/ 4692: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(9088), exports); + + +/***/ }), + +/***/ 9088: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TooManyTagsException = exports.RepositoryAlreadyExistsException = exports.InvalidTagParameterException = exports.CreateRepositoryResponse = exports.Repository = exports.CreateRepositoryRequest = exports.Tag = exports.ImageTagMutability = exports.ImageScanningConfiguration = exports.EncryptionConfiguration = exports.EncryptionType = exports.UnsupportedUpstreamRegistryException = exports.PullThroughCacheRuleAlreadyExistsException = exports.LimitExceededException = exports.CreatePullThroughCacheRuleResponse = exports.CreatePullThroughCacheRuleRequest = exports.UploadNotFoundException = exports.LayerPartTooSmallException = exports.LayerAlreadyExistsException = exports.KmsException = exports.InvalidLayerException = exports.EmptyUploadException = exports.CompleteLayerUploadResponse = exports.CompleteLayerUploadRequest = exports.ValidationException = exports.BatchGetRepositoryScanningConfigurationResponse = exports.RepositoryScanningConfiguration = exports.ScanFrequency = exports.ScanningRepositoryFilter = exports.ScanningRepositoryFilterType = exports.RepositoryScanningConfigurationFailure = exports.ScanningConfigurationFailureCode = exports.BatchGetRepositoryScanningConfigurationRequest = exports.BatchGetImageResponse = exports.Image = exports.BatchGetImageRequest = exports.BatchDeleteImageResponse = exports.ImageFailure = exports.ImageFailureCode = exports.BatchDeleteImageRequest = exports.ImageIdentifier = exports.ServerException = exports.RepositoryNotFoundException = exports.InvalidParameterException = exports.BatchCheckLayerAvailabilityResponse = exports.Layer = exports.LayerAvailability = exports.LayerFailure = exports.LayerFailureCode = exports.BatchCheckLayerAvailabilityRequest = void 0; +exports.DescribePullThroughCacheRulesResponse = exports.PullThroughCacheRule = exports.DescribePullThroughCacheRulesRequest = exports.ScanNotFoundException = exports.DescribeImageScanFindingsResponse = exports.ImageScanFindings = exports.ImageScanFinding = exports.Attribute = exports.EnhancedImageScanFinding = exports.ScoreDetails = exports.CvssScoreDetails = exports.CvssScoreAdjustment = exports.Resource = exports.ResourceDetails = exports.AwsEcrContainerImageDetails = exports.Remediation = exports.Recommendation = exports.PackageVulnerabilityDetails = exports.VulnerablePackage = exports.CvssScore = exports.DescribeImageScanFindingsRequest = exports.DescribeImagesResponse = exports.ImageDetail = exports.ImageScanStatus = exports.ScanStatus = exports.ImageScanFindingsSummary = exports.FindingSeverity = exports.DescribeImagesRequest = exports.DescribeImagesFilter = exports.TagStatus = exports.ImageNotFoundException = exports.DescribeImageReplicationStatusResponse = exports.ImageReplicationStatus = exports.ReplicationStatus = exports.DescribeImageReplicationStatusRequest = exports.RepositoryPolicyNotFoundException = exports.DeleteRepositoryPolicyResponse = exports.DeleteRepositoryPolicyRequest = exports.RepositoryNotEmptyException = exports.DeleteRepositoryResponse = exports.DeleteRepositoryRequest = exports.RegistryPolicyNotFoundException = exports.DeleteRegistryPolicyResponse = exports.DeleteRegistryPolicyRequest = exports.PullThroughCacheRuleNotFoundException = exports.DeletePullThroughCacheRuleResponse = exports.DeletePullThroughCacheRuleRequest = exports.LifecyclePolicyNotFoundException = exports.DeleteLifecyclePolicyResponse = exports.DeleteLifecyclePolicyRequest = void 0; +exports.PutImageScanningConfigurationRequest = exports.ReferencedImagesNotFoundException = exports.PutImageResponse = exports.PutImageRequest = exports.ImageTagAlreadyExistsException = exports.ImageDigestDoesNotMatchException = exports.ImageAlreadyExistsException = exports.ListTagsForResourceResponse = exports.ListTagsForResourceRequest = exports.ListImagesResponse = exports.ListImagesRequest = exports.ListImagesFilter = exports.InitiateLayerUploadResponse = exports.InitiateLayerUploadRequest = exports.GetRepositoryPolicyResponse = exports.GetRepositoryPolicyRequest = exports.GetRegistryScanningConfigurationResponse = exports.RegistryScanningConfiguration = exports.ScanType = exports.RegistryScanningRule = exports.GetRegistryScanningConfigurationRequest = exports.GetRegistryPolicyResponse = exports.GetRegistryPolicyRequest = exports.LifecyclePolicyPreviewNotFoundException = exports.GetLifecyclePolicyPreviewResponse = exports.LifecyclePolicyPreviewSummary = exports.LifecyclePolicyPreviewStatus = exports.LifecyclePolicyPreviewResult = exports.LifecyclePolicyRuleAction = exports.ImageActionType = exports.GetLifecyclePolicyPreviewRequest = exports.LifecyclePolicyPreviewFilter = exports.GetLifecyclePolicyResponse = exports.GetLifecyclePolicyRequest = exports.LayersNotFoundException = exports.LayerInaccessibleException = exports.GetDownloadUrlForLayerResponse = exports.GetDownloadUrlForLayerRequest = exports.GetAuthorizationTokenResponse = exports.AuthorizationData = exports.GetAuthorizationTokenRequest = exports.DescribeRepositoriesResponse = exports.DescribeRepositoriesRequest = exports.DescribeRegistryResponse = exports.ReplicationConfiguration = exports.ReplicationRule = exports.RepositoryFilter = exports.RepositoryFilterType = exports.ReplicationDestination = exports.DescribeRegistryRequest = void 0; +exports.UploadLayerPartResponse = exports.UploadLayerPartRequest = exports.InvalidLayerPartException = exports.UntagResourceResponse = exports.UntagResourceRequest = exports.TagResourceResponse = exports.TagResourceRequest = exports.StartLifecyclePolicyPreviewResponse = exports.StartLifecyclePolicyPreviewRequest = exports.LifecyclePolicyPreviewInProgressException = exports.UnsupportedImageTypeException = exports.StartImageScanResponse = exports.StartImageScanRequest = exports.SetRepositoryPolicyResponse = exports.SetRepositoryPolicyRequest = exports.PutReplicationConfigurationResponse = exports.PutReplicationConfigurationRequest = exports.PutRegistryScanningConfigurationResponse = exports.PutRegistryScanningConfigurationRequest = exports.PutRegistryPolicyResponse = exports.PutRegistryPolicyRequest = exports.PutLifecyclePolicyResponse = exports.PutLifecyclePolicyRequest = exports.PutImageTagMutabilityResponse = exports.PutImageTagMutabilityRequest = exports.PutImageScanningConfigurationResponse = void 0; +var BatchCheckLayerAvailabilityRequest; +(function (BatchCheckLayerAvailabilityRequest) { + BatchCheckLayerAvailabilityRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(BatchCheckLayerAvailabilityRequest = exports.BatchCheckLayerAvailabilityRequest || (exports.BatchCheckLayerAvailabilityRequest = {})); +var LayerFailureCode; +(function (LayerFailureCode) { + LayerFailureCode["InvalidLayerDigest"] = "InvalidLayerDigest"; + LayerFailureCode["MissingLayerDigest"] = "MissingLayerDigest"; +})(LayerFailureCode = exports.LayerFailureCode || (exports.LayerFailureCode = {})); +var LayerFailure; +(function (LayerFailure) { + LayerFailure.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LayerFailure = exports.LayerFailure || (exports.LayerFailure = {})); +var LayerAvailability; +(function (LayerAvailability) { + LayerAvailability["AVAILABLE"] = "AVAILABLE"; + LayerAvailability["UNAVAILABLE"] = "UNAVAILABLE"; +})(LayerAvailability = exports.LayerAvailability || (exports.LayerAvailability = {})); +var Layer; +(function (Layer) { + Layer.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Layer = exports.Layer || (exports.Layer = {})); +var BatchCheckLayerAvailabilityResponse; +(function (BatchCheckLayerAvailabilityResponse) { + BatchCheckLayerAvailabilityResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(BatchCheckLayerAvailabilityResponse = exports.BatchCheckLayerAvailabilityResponse || (exports.BatchCheckLayerAvailabilityResponse = {})); +var InvalidParameterException; +(function (InvalidParameterException) { + InvalidParameterException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidParameterException = exports.InvalidParameterException || (exports.InvalidParameterException = {})); +var RepositoryNotFoundException; +(function (RepositoryNotFoundException) { + RepositoryNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RepositoryNotFoundException = exports.RepositoryNotFoundException || (exports.RepositoryNotFoundException = {})); +var ServerException; +(function (ServerException) { + ServerException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ServerException = exports.ServerException || (exports.ServerException = {})); +var ImageIdentifier; +(function (ImageIdentifier) { + ImageIdentifier.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ImageIdentifier = exports.ImageIdentifier || (exports.ImageIdentifier = {})); +var BatchDeleteImageRequest; +(function (BatchDeleteImageRequest) { + BatchDeleteImageRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(BatchDeleteImageRequest = exports.BatchDeleteImageRequest || (exports.BatchDeleteImageRequest = {})); +var ImageFailureCode; +(function (ImageFailureCode) { + ImageFailureCode["ImageNotFound"] = "ImageNotFound"; + ImageFailureCode["ImageReferencedByManifestList"] = "ImageReferencedByManifestList"; + ImageFailureCode["ImageTagDoesNotMatchDigest"] = "ImageTagDoesNotMatchDigest"; + ImageFailureCode["InvalidImageDigest"] = "InvalidImageDigest"; + ImageFailureCode["InvalidImageTag"] = "InvalidImageTag"; + ImageFailureCode["KmsError"] = "KmsError"; + ImageFailureCode["MissingDigestAndTag"] = "MissingDigestAndTag"; +})(ImageFailureCode = exports.ImageFailureCode || (exports.ImageFailureCode = {})); +var ImageFailure; +(function (ImageFailure) { + ImageFailure.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ImageFailure = exports.ImageFailure || (exports.ImageFailure = {})); +var BatchDeleteImageResponse; +(function (BatchDeleteImageResponse) { + BatchDeleteImageResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(BatchDeleteImageResponse = exports.BatchDeleteImageResponse || (exports.BatchDeleteImageResponse = {})); +var BatchGetImageRequest; +(function (BatchGetImageRequest) { + BatchGetImageRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(BatchGetImageRequest = exports.BatchGetImageRequest || (exports.BatchGetImageRequest = {})); +var Image; +(function (Image) { + Image.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Image = exports.Image || (exports.Image = {})); +var BatchGetImageResponse; +(function (BatchGetImageResponse) { + BatchGetImageResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(BatchGetImageResponse = exports.BatchGetImageResponse || (exports.BatchGetImageResponse = {})); +var BatchGetRepositoryScanningConfigurationRequest; +(function (BatchGetRepositoryScanningConfigurationRequest) { + BatchGetRepositoryScanningConfigurationRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(BatchGetRepositoryScanningConfigurationRequest = exports.BatchGetRepositoryScanningConfigurationRequest || (exports.BatchGetRepositoryScanningConfigurationRequest = {})); +var ScanningConfigurationFailureCode; +(function (ScanningConfigurationFailureCode) { + ScanningConfigurationFailureCode["REPOSITORY_NOT_FOUND"] = "REPOSITORY_NOT_FOUND"; +})(ScanningConfigurationFailureCode = exports.ScanningConfigurationFailureCode || (exports.ScanningConfigurationFailureCode = {})); +var RepositoryScanningConfigurationFailure; +(function (RepositoryScanningConfigurationFailure) { + RepositoryScanningConfigurationFailure.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RepositoryScanningConfigurationFailure = exports.RepositoryScanningConfigurationFailure || (exports.RepositoryScanningConfigurationFailure = {})); +var ScanningRepositoryFilterType; +(function (ScanningRepositoryFilterType) { + ScanningRepositoryFilterType["WILDCARD"] = "WILDCARD"; +})(ScanningRepositoryFilterType = exports.ScanningRepositoryFilterType || (exports.ScanningRepositoryFilterType = {})); +var ScanningRepositoryFilter; +(function (ScanningRepositoryFilter) { + ScanningRepositoryFilter.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ScanningRepositoryFilter = exports.ScanningRepositoryFilter || (exports.ScanningRepositoryFilter = {})); +var ScanFrequency; +(function (ScanFrequency) { + ScanFrequency["CONTINUOUS_SCAN"] = "CONTINUOUS_SCAN"; + ScanFrequency["MANUAL"] = "MANUAL"; + ScanFrequency["SCAN_ON_PUSH"] = "SCAN_ON_PUSH"; +})(ScanFrequency = exports.ScanFrequency || (exports.ScanFrequency = {})); +var RepositoryScanningConfiguration; +(function (RepositoryScanningConfiguration) { + RepositoryScanningConfiguration.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RepositoryScanningConfiguration = exports.RepositoryScanningConfiguration || (exports.RepositoryScanningConfiguration = {})); +var BatchGetRepositoryScanningConfigurationResponse; +(function (BatchGetRepositoryScanningConfigurationResponse) { + BatchGetRepositoryScanningConfigurationResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(BatchGetRepositoryScanningConfigurationResponse = exports.BatchGetRepositoryScanningConfigurationResponse || (exports.BatchGetRepositoryScanningConfigurationResponse = {})); +var ValidationException; +(function (ValidationException) { + ValidationException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ValidationException = exports.ValidationException || (exports.ValidationException = {})); +var CompleteLayerUploadRequest; +(function (CompleteLayerUploadRequest) { + CompleteLayerUploadRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CompleteLayerUploadRequest = exports.CompleteLayerUploadRequest || (exports.CompleteLayerUploadRequest = {})); +var CompleteLayerUploadResponse; +(function (CompleteLayerUploadResponse) { + CompleteLayerUploadResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CompleteLayerUploadResponse = exports.CompleteLayerUploadResponse || (exports.CompleteLayerUploadResponse = {})); +var EmptyUploadException; +(function (EmptyUploadException) { + EmptyUploadException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(EmptyUploadException = exports.EmptyUploadException || (exports.EmptyUploadException = {})); +var InvalidLayerException; +(function (InvalidLayerException) { + InvalidLayerException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidLayerException = exports.InvalidLayerException || (exports.InvalidLayerException = {})); +var KmsException; +(function (KmsException) { + KmsException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(KmsException = exports.KmsException || (exports.KmsException = {})); +var LayerAlreadyExistsException; +(function (LayerAlreadyExistsException) { + LayerAlreadyExistsException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LayerAlreadyExistsException = exports.LayerAlreadyExistsException || (exports.LayerAlreadyExistsException = {})); +var LayerPartTooSmallException; +(function (LayerPartTooSmallException) { + LayerPartTooSmallException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LayerPartTooSmallException = exports.LayerPartTooSmallException || (exports.LayerPartTooSmallException = {})); +var UploadNotFoundException; +(function (UploadNotFoundException) { + UploadNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UploadNotFoundException = exports.UploadNotFoundException || (exports.UploadNotFoundException = {})); +var CreatePullThroughCacheRuleRequest; +(function (CreatePullThroughCacheRuleRequest) { + CreatePullThroughCacheRuleRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreatePullThroughCacheRuleRequest = exports.CreatePullThroughCacheRuleRequest || (exports.CreatePullThroughCacheRuleRequest = {})); +var CreatePullThroughCacheRuleResponse; +(function (CreatePullThroughCacheRuleResponse) { + CreatePullThroughCacheRuleResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreatePullThroughCacheRuleResponse = exports.CreatePullThroughCacheRuleResponse || (exports.CreatePullThroughCacheRuleResponse = {})); +var LimitExceededException; +(function (LimitExceededException) { + LimitExceededException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LimitExceededException = exports.LimitExceededException || (exports.LimitExceededException = {})); +var PullThroughCacheRuleAlreadyExistsException; +(function (PullThroughCacheRuleAlreadyExistsException) { + PullThroughCacheRuleAlreadyExistsException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PullThroughCacheRuleAlreadyExistsException = exports.PullThroughCacheRuleAlreadyExistsException || (exports.PullThroughCacheRuleAlreadyExistsException = {})); +var UnsupportedUpstreamRegistryException; +(function (UnsupportedUpstreamRegistryException) { + UnsupportedUpstreamRegistryException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UnsupportedUpstreamRegistryException = exports.UnsupportedUpstreamRegistryException || (exports.UnsupportedUpstreamRegistryException = {})); +var EncryptionType; +(function (EncryptionType) { + EncryptionType["AES256"] = "AES256"; + EncryptionType["KMS"] = "KMS"; +})(EncryptionType = exports.EncryptionType || (exports.EncryptionType = {})); +var EncryptionConfiguration; +(function (EncryptionConfiguration) { + EncryptionConfiguration.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(EncryptionConfiguration = exports.EncryptionConfiguration || (exports.EncryptionConfiguration = {})); +var ImageScanningConfiguration; +(function (ImageScanningConfiguration) { + ImageScanningConfiguration.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ImageScanningConfiguration = exports.ImageScanningConfiguration || (exports.ImageScanningConfiguration = {})); +var ImageTagMutability; +(function (ImageTagMutability) { + ImageTagMutability["IMMUTABLE"] = "IMMUTABLE"; + ImageTagMutability["MUTABLE"] = "MUTABLE"; +})(ImageTagMutability = exports.ImageTagMutability || (exports.ImageTagMutability = {})); +var Tag; +(function (Tag) { + Tag.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Tag = exports.Tag || (exports.Tag = {})); +var CreateRepositoryRequest; +(function (CreateRepositoryRequest) { + CreateRepositoryRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateRepositoryRequest = exports.CreateRepositoryRequest || (exports.CreateRepositoryRequest = {})); +var Repository; +(function (Repository) { + Repository.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Repository = exports.Repository || (exports.Repository = {})); +var CreateRepositoryResponse; +(function (CreateRepositoryResponse) { + CreateRepositoryResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CreateRepositoryResponse = exports.CreateRepositoryResponse || (exports.CreateRepositoryResponse = {})); +var InvalidTagParameterException; +(function (InvalidTagParameterException) { + InvalidTagParameterException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidTagParameterException = exports.InvalidTagParameterException || (exports.InvalidTagParameterException = {})); +var RepositoryAlreadyExistsException; +(function (RepositoryAlreadyExistsException) { + RepositoryAlreadyExistsException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RepositoryAlreadyExistsException = exports.RepositoryAlreadyExistsException || (exports.RepositoryAlreadyExistsException = {})); +var TooManyTagsException; +(function (TooManyTagsException) { + TooManyTagsException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TooManyTagsException = exports.TooManyTagsException || (exports.TooManyTagsException = {})); +var DeleteLifecyclePolicyRequest; +(function (DeleteLifecyclePolicyRequest) { + DeleteLifecyclePolicyRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteLifecyclePolicyRequest = exports.DeleteLifecyclePolicyRequest || (exports.DeleteLifecyclePolicyRequest = {})); +var DeleteLifecyclePolicyResponse; +(function (DeleteLifecyclePolicyResponse) { + DeleteLifecyclePolicyResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteLifecyclePolicyResponse = exports.DeleteLifecyclePolicyResponse || (exports.DeleteLifecyclePolicyResponse = {})); +var LifecyclePolicyNotFoundException; +(function (LifecyclePolicyNotFoundException) { + LifecyclePolicyNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LifecyclePolicyNotFoundException = exports.LifecyclePolicyNotFoundException || (exports.LifecyclePolicyNotFoundException = {})); +var DeletePullThroughCacheRuleRequest; +(function (DeletePullThroughCacheRuleRequest) { + DeletePullThroughCacheRuleRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeletePullThroughCacheRuleRequest = exports.DeletePullThroughCacheRuleRequest || (exports.DeletePullThroughCacheRuleRequest = {})); +var DeletePullThroughCacheRuleResponse; +(function (DeletePullThroughCacheRuleResponse) { + DeletePullThroughCacheRuleResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeletePullThroughCacheRuleResponse = exports.DeletePullThroughCacheRuleResponse || (exports.DeletePullThroughCacheRuleResponse = {})); +var PullThroughCacheRuleNotFoundException; +(function (PullThroughCacheRuleNotFoundException) { + PullThroughCacheRuleNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PullThroughCacheRuleNotFoundException = exports.PullThroughCacheRuleNotFoundException || (exports.PullThroughCacheRuleNotFoundException = {})); +var DeleteRegistryPolicyRequest; +(function (DeleteRegistryPolicyRequest) { + DeleteRegistryPolicyRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteRegistryPolicyRequest = exports.DeleteRegistryPolicyRequest || (exports.DeleteRegistryPolicyRequest = {})); +var DeleteRegistryPolicyResponse; +(function (DeleteRegistryPolicyResponse) { + DeleteRegistryPolicyResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteRegistryPolicyResponse = exports.DeleteRegistryPolicyResponse || (exports.DeleteRegistryPolicyResponse = {})); +var RegistryPolicyNotFoundException; +(function (RegistryPolicyNotFoundException) { + RegistryPolicyNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RegistryPolicyNotFoundException = exports.RegistryPolicyNotFoundException || (exports.RegistryPolicyNotFoundException = {})); +var DeleteRepositoryRequest; +(function (DeleteRepositoryRequest) { + DeleteRepositoryRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteRepositoryRequest = exports.DeleteRepositoryRequest || (exports.DeleteRepositoryRequest = {})); +var DeleteRepositoryResponse; +(function (DeleteRepositoryResponse) { + DeleteRepositoryResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteRepositoryResponse = exports.DeleteRepositoryResponse || (exports.DeleteRepositoryResponse = {})); +var RepositoryNotEmptyException; +(function (RepositoryNotEmptyException) { + RepositoryNotEmptyException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RepositoryNotEmptyException = exports.RepositoryNotEmptyException || (exports.RepositoryNotEmptyException = {})); +var DeleteRepositoryPolicyRequest; +(function (DeleteRepositoryPolicyRequest) { + DeleteRepositoryPolicyRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteRepositoryPolicyRequest = exports.DeleteRepositoryPolicyRequest || (exports.DeleteRepositoryPolicyRequest = {})); +var DeleteRepositoryPolicyResponse; +(function (DeleteRepositoryPolicyResponse) { + DeleteRepositoryPolicyResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DeleteRepositoryPolicyResponse = exports.DeleteRepositoryPolicyResponse || (exports.DeleteRepositoryPolicyResponse = {})); +var RepositoryPolicyNotFoundException; +(function (RepositoryPolicyNotFoundException) { + RepositoryPolicyNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RepositoryPolicyNotFoundException = exports.RepositoryPolicyNotFoundException || (exports.RepositoryPolicyNotFoundException = {})); +var DescribeImageReplicationStatusRequest; +(function (DescribeImageReplicationStatusRequest) { + DescribeImageReplicationStatusRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeImageReplicationStatusRequest = exports.DescribeImageReplicationStatusRequest || (exports.DescribeImageReplicationStatusRequest = {})); +var ReplicationStatus; +(function (ReplicationStatus) { + ReplicationStatus["COMPLETE"] = "COMPLETE"; + ReplicationStatus["FAILED"] = "FAILED"; + ReplicationStatus["IN_PROGRESS"] = "IN_PROGRESS"; +})(ReplicationStatus = exports.ReplicationStatus || (exports.ReplicationStatus = {})); +var ImageReplicationStatus; +(function (ImageReplicationStatus) { + ImageReplicationStatus.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ImageReplicationStatus = exports.ImageReplicationStatus || (exports.ImageReplicationStatus = {})); +var DescribeImageReplicationStatusResponse; +(function (DescribeImageReplicationStatusResponse) { + DescribeImageReplicationStatusResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeImageReplicationStatusResponse = exports.DescribeImageReplicationStatusResponse || (exports.DescribeImageReplicationStatusResponse = {})); +var ImageNotFoundException; +(function (ImageNotFoundException) { + ImageNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ImageNotFoundException = exports.ImageNotFoundException || (exports.ImageNotFoundException = {})); +var TagStatus; +(function (TagStatus) { + TagStatus["ANY"] = "ANY"; + TagStatus["TAGGED"] = "TAGGED"; + TagStatus["UNTAGGED"] = "UNTAGGED"; +})(TagStatus = exports.TagStatus || (exports.TagStatus = {})); +var DescribeImagesFilter; +(function (DescribeImagesFilter) { + DescribeImagesFilter.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeImagesFilter = exports.DescribeImagesFilter || (exports.DescribeImagesFilter = {})); +var DescribeImagesRequest; +(function (DescribeImagesRequest) { + DescribeImagesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeImagesRequest = exports.DescribeImagesRequest || (exports.DescribeImagesRequest = {})); +var FindingSeverity; +(function (FindingSeverity) { + FindingSeverity["CRITICAL"] = "CRITICAL"; + FindingSeverity["HIGH"] = "HIGH"; + FindingSeverity["INFORMATIONAL"] = "INFORMATIONAL"; + FindingSeverity["LOW"] = "LOW"; + FindingSeverity["MEDIUM"] = "MEDIUM"; + FindingSeverity["UNDEFINED"] = "UNDEFINED"; +})(FindingSeverity = exports.FindingSeverity || (exports.FindingSeverity = {})); +var ImageScanFindingsSummary; +(function (ImageScanFindingsSummary) { + ImageScanFindingsSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ImageScanFindingsSummary = exports.ImageScanFindingsSummary || (exports.ImageScanFindingsSummary = {})); +var ScanStatus; +(function (ScanStatus) { + ScanStatus["ACTIVE"] = "ACTIVE"; + ScanStatus["COMPLETE"] = "COMPLETE"; + ScanStatus["FAILED"] = "FAILED"; + ScanStatus["FINDINGS_UNAVAILABLE"] = "FINDINGS_UNAVAILABLE"; + ScanStatus["IN_PROGRESS"] = "IN_PROGRESS"; + ScanStatus["PENDING"] = "PENDING"; + ScanStatus["SCAN_ELIGIBILITY_EXPIRED"] = "SCAN_ELIGIBILITY_EXPIRED"; + ScanStatus["UNSUPPORTED_IMAGE"] = "UNSUPPORTED_IMAGE"; +})(ScanStatus = exports.ScanStatus || (exports.ScanStatus = {})); +var ImageScanStatus; +(function (ImageScanStatus) { + ImageScanStatus.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ImageScanStatus = exports.ImageScanStatus || (exports.ImageScanStatus = {})); +var ImageDetail; +(function (ImageDetail) { + ImageDetail.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ImageDetail = exports.ImageDetail || (exports.ImageDetail = {})); +var DescribeImagesResponse; +(function (DescribeImagesResponse) { + DescribeImagesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeImagesResponse = exports.DescribeImagesResponse || (exports.DescribeImagesResponse = {})); +var DescribeImageScanFindingsRequest; +(function (DescribeImageScanFindingsRequest) { + DescribeImageScanFindingsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeImageScanFindingsRequest = exports.DescribeImageScanFindingsRequest || (exports.DescribeImageScanFindingsRequest = {})); +var CvssScore; +(function (CvssScore) { + CvssScore.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CvssScore = exports.CvssScore || (exports.CvssScore = {})); +var VulnerablePackage; +(function (VulnerablePackage) { + VulnerablePackage.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(VulnerablePackage = exports.VulnerablePackage || (exports.VulnerablePackage = {})); +var PackageVulnerabilityDetails; +(function (PackageVulnerabilityDetails) { + PackageVulnerabilityDetails.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PackageVulnerabilityDetails = exports.PackageVulnerabilityDetails || (exports.PackageVulnerabilityDetails = {})); +var Recommendation; +(function (Recommendation) { + Recommendation.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Recommendation = exports.Recommendation || (exports.Recommendation = {})); +var Remediation; +(function (Remediation) { + Remediation.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Remediation = exports.Remediation || (exports.Remediation = {})); +var AwsEcrContainerImageDetails; +(function (AwsEcrContainerImageDetails) { + AwsEcrContainerImageDetails.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AwsEcrContainerImageDetails = exports.AwsEcrContainerImageDetails || (exports.AwsEcrContainerImageDetails = {})); +var ResourceDetails; +(function (ResourceDetails) { + ResourceDetails.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ResourceDetails = exports.ResourceDetails || (exports.ResourceDetails = {})); +var Resource; +(function (Resource) { + Resource.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Resource = exports.Resource || (exports.Resource = {})); +var CvssScoreAdjustment; +(function (CvssScoreAdjustment) { + CvssScoreAdjustment.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CvssScoreAdjustment = exports.CvssScoreAdjustment || (exports.CvssScoreAdjustment = {})); +var CvssScoreDetails; +(function (CvssScoreDetails) { + CvssScoreDetails.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(CvssScoreDetails = exports.CvssScoreDetails || (exports.CvssScoreDetails = {})); +var ScoreDetails; +(function (ScoreDetails) { + ScoreDetails.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ScoreDetails = exports.ScoreDetails || (exports.ScoreDetails = {})); +var EnhancedImageScanFinding; +(function (EnhancedImageScanFinding) { + EnhancedImageScanFinding.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(EnhancedImageScanFinding = exports.EnhancedImageScanFinding || (exports.EnhancedImageScanFinding = {})); +var Attribute; +(function (Attribute) { + Attribute.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Attribute = exports.Attribute || (exports.Attribute = {})); +var ImageScanFinding; +(function (ImageScanFinding) { + ImageScanFinding.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ImageScanFinding = exports.ImageScanFinding || (exports.ImageScanFinding = {})); +var ImageScanFindings; +(function (ImageScanFindings) { + ImageScanFindings.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ImageScanFindings = exports.ImageScanFindings || (exports.ImageScanFindings = {})); +var DescribeImageScanFindingsResponse; +(function (DescribeImageScanFindingsResponse) { + DescribeImageScanFindingsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeImageScanFindingsResponse = exports.DescribeImageScanFindingsResponse || (exports.DescribeImageScanFindingsResponse = {})); +var ScanNotFoundException; +(function (ScanNotFoundException) { + ScanNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ScanNotFoundException = exports.ScanNotFoundException || (exports.ScanNotFoundException = {})); +var DescribePullThroughCacheRulesRequest; +(function (DescribePullThroughCacheRulesRequest) { + DescribePullThroughCacheRulesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribePullThroughCacheRulesRequest = exports.DescribePullThroughCacheRulesRequest || (exports.DescribePullThroughCacheRulesRequest = {})); +var PullThroughCacheRule; +(function (PullThroughCacheRule) { + PullThroughCacheRule.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PullThroughCacheRule = exports.PullThroughCacheRule || (exports.PullThroughCacheRule = {})); +var DescribePullThroughCacheRulesResponse; +(function (DescribePullThroughCacheRulesResponse) { + DescribePullThroughCacheRulesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribePullThroughCacheRulesResponse = exports.DescribePullThroughCacheRulesResponse || (exports.DescribePullThroughCacheRulesResponse = {})); +var DescribeRegistryRequest; +(function (DescribeRegistryRequest) { + DescribeRegistryRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeRegistryRequest = exports.DescribeRegistryRequest || (exports.DescribeRegistryRequest = {})); +var ReplicationDestination; +(function (ReplicationDestination) { + ReplicationDestination.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ReplicationDestination = exports.ReplicationDestination || (exports.ReplicationDestination = {})); +var RepositoryFilterType; +(function (RepositoryFilterType) { + RepositoryFilterType["PREFIX_MATCH"] = "PREFIX_MATCH"; +})(RepositoryFilterType = exports.RepositoryFilterType || (exports.RepositoryFilterType = {})); +var RepositoryFilter; +(function (RepositoryFilter) { + RepositoryFilter.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RepositoryFilter = exports.RepositoryFilter || (exports.RepositoryFilter = {})); +var ReplicationRule; +(function (ReplicationRule) { + ReplicationRule.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ReplicationRule = exports.ReplicationRule || (exports.ReplicationRule = {})); +var ReplicationConfiguration; +(function (ReplicationConfiguration) { + ReplicationConfiguration.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ReplicationConfiguration = exports.ReplicationConfiguration || (exports.ReplicationConfiguration = {})); +var DescribeRegistryResponse; +(function (DescribeRegistryResponse) { + DescribeRegistryResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeRegistryResponse = exports.DescribeRegistryResponse || (exports.DescribeRegistryResponse = {})); +var DescribeRepositoriesRequest; +(function (DescribeRepositoriesRequest) { + DescribeRepositoriesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeRepositoriesRequest = exports.DescribeRepositoriesRequest || (exports.DescribeRepositoriesRequest = {})); +var DescribeRepositoriesResponse; +(function (DescribeRepositoriesResponse) { + DescribeRepositoriesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DescribeRepositoriesResponse = exports.DescribeRepositoriesResponse || (exports.DescribeRepositoriesResponse = {})); +var GetAuthorizationTokenRequest; +(function (GetAuthorizationTokenRequest) { + GetAuthorizationTokenRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetAuthorizationTokenRequest = exports.GetAuthorizationTokenRequest || (exports.GetAuthorizationTokenRequest = {})); +var AuthorizationData; +(function (AuthorizationData) { + AuthorizationData.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AuthorizationData = exports.AuthorizationData || (exports.AuthorizationData = {})); +var GetAuthorizationTokenResponse; +(function (GetAuthorizationTokenResponse) { + GetAuthorizationTokenResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetAuthorizationTokenResponse = exports.GetAuthorizationTokenResponse || (exports.GetAuthorizationTokenResponse = {})); +var GetDownloadUrlForLayerRequest; +(function (GetDownloadUrlForLayerRequest) { + GetDownloadUrlForLayerRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetDownloadUrlForLayerRequest = exports.GetDownloadUrlForLayerRequest || (exports.GetDownloadUrlForLayerRequest = {})); +var GetDownloadUrlForLayerResponse; +(function (GetDownloadUrlForLayerResponse) { + GetDownloadUrlForLayerResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetDownloadUrlForLayerResponse = exports.GetDownloadUrlForLayerResponse || (exports.GetDownloadUrlForLayerResponse = {})); +var LayerInaccessibleException; +(function (LayerInaccessibleException) { + LayerInaccessibleException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LayerInaccessibleException = exports.LayerInaccessibleException || (exports.LayerInaccessibleException = {})); +var LayersNotFoundException; +(function (LayersNotFoundException) { + LayersNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LayersNotFoundException = exports.LayersNotFoundException || (exports.LayersNotFoundException = {})); +var GetLifecyclePolicyRequest; +(function (GetLifecyclePolicyRequest) { + GetLifecyclePolicyRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetLifecyclePolicyRequest = exports.GetLifecyclePolicyRequest || (exports.GetLifecyclePolicyRequest = {})); +var GetLifecyclePolicyResponse; +(function (GetLifecyclePolicyResponse) { + GetLifecyclePolicyResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetLifecyclePolicyResponse = exports.GetLifecyclePolicyResponse || (exports.GetLifecyclePolicyResponse = {})); +var LifecyclePolicyPreviewFilter; +(function (LifecyclePolicyPreviewFilter) { + LifecyclePolicyPreviewFilter.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LifecyclePolicyPreviewFilter = exports.LifecyclePolicyPreviewFilter || (exports.LifecyclePolicyPreviewFilter = {})); +var GetLifecyclePolicyPreviewRequest; +(function (GetLifecyclePolicyPreviewRequest) { + GetLifecyclePolicyPreviewRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetLifecyclePolicyPreviewRequest = exports.GetLifecyclePolicyPreviewRequest || (exports.GetLifecyclePolicyPreviewRequest = {})); +var ImageActionType; +(function (ImageActionType) { + ImageActionType["EXPIRE"] = "EXPIRE"; +})(ImageActionType = exports.ImageActionType || (exports.ImageActionType = {})); +var LifecyclePolicyRuleAction; +(function (LifecyclePolicyRuleAction) { + LifecyclePolicyRuleAction.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LifecyclePolicyRuleAction = exports.LifecyclePolicyRuleAction || (exports.LifecyclePolicyRuleAction = {})); +var LifecyclePolicyPreviewResult; +(function (LifecyclePolicyPreviewResult) { + LifecyclePolicyPreviewResult.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LifecyclePolicyPreviewResult = exports.LifecyclePolicyPreviewResult || (exports.LifecyclePolicyPreviewResult = {})); +var LifecyclePolicyPreviewStatus; +(function (LifecyclePolicyPreviewStatus) { + LifecyclePolicyPreviewStatus["COMPLETE"] = "COMPLETE"; + LifecyclePolicyPreviewStatus["EXPIRED"] = "EXPIRED"; + LifecyclePolicyPreviewStatus["FAILED"] = "FAILED"; + LifecyclePolicyPreviewStatus["IN_PROGRESS"] = "IN_PROGRESS"; +})(LifecyclePolicyPreviewStatus = exports.LifecyclePolicyPreviewStatus || (exports.LifecyclePolicyPreviewStatus = {})); +var LifecyclePolicyPreviewSummary; +(function (LifecyclePolicyPreviewSummary) { + LifecyclePolicyPreviewSummary.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LifecyclePolicyPreviewSummary = exports.LifecyclePolicyPreviewSummary || (exports.LifecyclePolicyPreviewSummary = {})); +var GetLifecyclePolicyPreviewResponse; +(function (GetLifecyclePolicyPreviewResponse) { + GetLifecyclePolicyPreviewResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetLifecyclePolicyPreviewResponse = exports.GetLifecyclePolicyPreviewResponse || (exports.GetLifecyclePolicyPreviewResponse = {})); +var LifecyclePolicyPreviewNotFoundException; +(function (LifecyclePolicyPreviewNotFoundException) { + LifecyclePolicyPreviewNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LifecyclePolicyPreviewNotFoundException = exports.LifecyclePolicyPreviewNotFoundException || (exports.LifecyclePolicyPreviewNotFoundException = {})); +var GetRegistryPolicyRequest; +(function (GetRegistryPolicyRequest) { + GetRegistryPolicyRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetRegistryPolicyRequest = exports.GetRegistryPolicyRequest || (exports.GetRegistryPolicyRequest = {})); +var GetRegistryPolicyResponse; +(function (GetRegistryPolicyResponse) { + GetRegistryPolicyResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetRegistryPolicyResponse = exports.GetRegistryPolicyResponse || (exports.GetRegistryPolicyResponse = {})); +var GetRegistryScanningConfigurationRequest; +(function (GetRegistryScanningConfigurationRequest) { + GetRegistryScanningConfigurationRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetRegistryScanningConfigurationRequest = exports.GetRegistryScanningConfigurationRequest || (exports.GetRegistryScanningConfigurationRequest = {})); +var RegistryScanningRule; +(function (RegistryScanningRule) { + RegistryScanningRule.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RegistryScanningRule = exports.RegistryScanningRule || (exports.RegistryScanningRule = {})); +var ScanType; +(function (ScanType) { + ScanType["BASIC"] = "BASIC"; + ScanType["ENHANCED"] = "ENHANCED"; +})(ScanType = exports.ScanType || (exports.ScanType = {})); +var RegistryScanningConfiguration; +(function (RegistryScanningConfiguration) { + RegistryScanningConfiguration.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RegistryScanningConfiguration = exports.RegistryScanningConfiguration || (exports.RegistryScanningConfiguration = {})); +var GetRegistryScanningConfigurationResponse; +(function (GetRegistryScanningConfigurationResponse) { + GetRegistryScanningConfigurationResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetRegistryScanningConfigurationResponse = exports.GetRegistryScanningConfigurationResponse || (exports.GetRegistryScanningConfigurationResponse = {})); +var GetRepositoryPolicyRequest; +(function (GetRepositoryPolicyRequest) { + GetRepositoryPolicyRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetRepositoryPolicyRequest = exports.GetRepositoryPolicyRequest || (exports.GetRepositoryPolicyRequest = {})); +var GetRepositoryPolicyResponse; +(function (GetRepositoryPolicyResponse) { + GetRepositoryPolicyResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetRepositoryPolicyResponse = exports.GetRepositoryPolicyResponse || (exports.GetRepositoryPolicyResponse = {})); +var InitiateLayerUploadRequest; +(function (InitiateLayerUploadRequest) { + InitiateLayerUploadRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InitiateLayerUploadRequest = exports.InitiateLayerUploadRequest || (exports.InitiateLayerUploadRequest = {})); +var InitiateLayerUploadResponse; +(function (InitiateLayerUploadResponse) { + InitiateLayerUploadResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InitiateLayerUploadResponse = exports.InitiateLayerUploadResponse || (exports.InitiateLayerUploadResponse = {})); +var ListImagesFilter; +(function (ListImagesFilter) { + ListImagesFilter.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListImagesFilter = exports.ListImagesFilter || (exports.ListImagesFilter = {})); +var ListImagesRequest; +(function (ListImagesRequest) { + ListImagesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListImagesRequest = exports.ListImagesRequest || (exports.ListImagesRequest = {})); +var ListImagesResponse; +(function (ListImagesResponse) { + ListImagesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListImagesResponse = exports.ListImagesResponse || (exports.ListImagesResponse = {})); +var ListTagsForResourceRequest; +(function (ListTagsForResourceRequest) { + ListTagsForResourceRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListTagsForResourceRequest = exports.ListTagsForResourceRequest || (exports.ListTagsForResourceRequest = {})); +var ListTagsForResourceResponse; +(function (ListTagsForResourceResponse) { + ListTagsForResourceResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListTagsForResourceResponse = exports.ListTagsForResourceResponse || (exports.ListTagsForResourceResponse = {})); +var ImageAlreadyExistsException; +(function (ImageAlreadyExistsException) { + ImageAlreadyExistsException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ImageAlreadyExistsException = exports.ImageAlreadyExistsException || (exports.ImageAlreadyExistsException = {})); +var ImageDigestDoesNotMatchException; +(function (ImageDigestDoesNotMatchException) { + ImageDigestDoesNotMatchException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ImageDigestDoesNotMatchException = exports.ImageDigestDoesNotMatchException || (exports.ImageDigestDoesNotMatchException = {})); +var ImageTagAlreadyExistsException; +(function (ImageTagAlreadyExistsException) { + ImageTagAlreadyExistsException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ImageTagAlreadyExistsException = exports.ImageTagAlreadyExistsException || (exports.ImageTagAlreadyExistsException = {})); +var PutImageRequest; +(function (PutImageRequest) { + PutImageRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PutImageRequest = exports.PutImageRequest || (exports.PutImageRequest = {})); +var PutImageResponse; +(function (PutImageResponse) { + PutImageResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PutImageResponse = exports.PutImageResponse || (exports.PutImageResponse = {})); +var ReferencedImagesNotFoundException; +(function (ReferencedImagesNotFoundException) { + ReferencedImagesNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ReferencedImagesNotFoundException = exports.ReferencedImagesNotFoundException || (exports.ReferencedImagesNotFoundException = {})); +var PutImageScanningConfigurationRequest; +(function (PutImageScanningConfigurationRequest) { + PutImageScanningConfigurationRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PutImageScanningConfigurationRequest = exports.PutImageScanningConfigurationRequest || (exports.PutImageScanningConfigurationRequest = {})); +var PutImageScanningConfigurationResponse; +(function (PutImageScanningConfigurationResponse) { + PutImageScanningConfigurationResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PutImageScanningConfigurationResponse = exports.PutImageScanningConfigurationResponse || (exports.PutImageScanningConfigurationResponse = {})); +var PutImageTagMutabilityRequest; +(function (PutImageTagMutabilityRequest) { + PutImageTagMutabilityRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PutImageTagMutabilityRequest = exports.PutImageTagMutabilityRequest || (exports.PutImageTagMutabilityRequest = {})); +var PutImageTagMutabilityResponse; +(function (PutImageTagMutabilityResponse) { + PutImageTagMutabilityResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PutImageTagMutabilityResponse = exports.PutImageTagMutabilityResponse || (exports.PutImageTagMutabilityResponse = {})); +var PutLifecyclePolicyRequest; +(function (PutLifecyclePolicyRequest) { + PutLifecyclePolicyRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PutLifecyclePolicyRequest = exports.PutLifecyclePolicyRequest || (exports.PutLifecyclePolicyRequest = {})); +var PutLifecyclePolicyResponse; +(function (PutLifecyclePolicyResponse) { + PutLifecyclePolicyResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PutLifecyclePolicyResponse = exports.PutLifecyclePolicyResponse || (exports.PutLifecyclePolicyResponse = {})); +var PutRegistryPolicyRequest; +(function (PutRegistryPolicyRequest) { + PutRegistryPolicyRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PutRegistryPolicyRequest = exports.PutRegistryPolicyRequest || (exports.PutRegistryPolicyRequest = {})); +var PutRegistryPolicyResponse; +(function (PutRegistryPolicyResponse) { + PutRegistryPolicyResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PutRegistryPolicyResponse = exports.PutRegistryPolicyResponse || (exports.PutRegistryPolicyResponse = {})); +var PutRegistryScanningConfigurationRequest; +(function (PutRegistryScanningConfigurationRequest) { + PutRegistryScanningConfigurationRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PutRegistryScanningConfigurationRequest = exports.PutRegistryScanningConfigurationRequest || (exports.PutRegistryScanningConfigurationRequest = {})); +var PutRegistryScanningConfigurationResponse; +(function (PutRegistryScanningConfigurationResponse) { + PutRegistryScanningConfigurationResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PutRegistryScanningConfigurationResponse = exports.PutRegistryScanningConfigurationResponse || (exports.PutRegistryScanningConfigurationResponse = {})); +var PutReplicationConfigurationRequest; +(function (PutReplicationConfigurationRequest) { + PutReplicationConfigurationRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PutReplicationConfigurationRequest = exports.PutReplicationConfigurationRequest || (exports.PutReplicationConfigurationRequest = {})); +var PutReplicationConfigurationResponse; +(function (PutReplicationConfigurationResponse) { + PutReplicationConfigurationResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PutReplicationConfigurationResponse = exports.PutReplicationConfigurationResponse || (exports.PutReplicationConfigurationResponse = {})); +var SetRepositoryPolicyRequest; +(function (SetRepositoryPolicyRequest) { + SetRepositoryPolicyRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SetRepositoryPolicyRequest = exports.SetRepositoryPolicyRequest || (exports.SetRepositoryPolicyRequest = {})); +var SetRepositoryPolicyResponse; +(function (SetRepositoryPolicyResponse) { + SetRepositoryPolicyResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(SetRepositoryPolicyResponse = exports.SetRepositoryPolicyResponse || (exports.SetRepositoryPolicyResponse = {})); +var StartImageScanRequest; +(function (StartImageScanRequest) { + StartImageScanRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StartImageScanRequest = exports.StartImageScanRequest || (exports.StartImageScanRequest = {})); +var StartImageScanResponse; +(function (StartImageScanResponse) { + StartImageScanResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StartImageScanResponse = exports.StartImageScanResponse || (exports.StartImageScanResponse = {})); +var UnsupportedImageTypeException; +(function (UnsupportedImageTypeException) { + UnsupportedImageTypeException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UnsupportedImageTypeException = exports.UnsupportedImageTypeException || (exports.UnsupportedImageTypeException = {})); +var LifecyclePolicyPreviewInProgressException; +(function (LifecyclePolicyPreviewInProgressException) { + LifecyclePolicyPreviewInProgressException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(LifecyclePolicyPreviewInProgressException = exports.LifecyclePolicyPreviewInProgressException || (exports.LifecyclePolicyPreviewInProgressException = {})); +var StartLifecyclePolicyPreviewRequest; +(function (StartLifecyclePolicyPreviewRequest) { + StartLifecyclePolicyPreviewRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StartLifecyclePolicyPreviewRequest = exports.StartLifecyclePolicyPreviewRequest || (exports.StartLifecyclePolicyPreviewRequest = {})); +var StartLifecyclePolicyPreviewResponse; +(function (StartLifecyclePolicyPreviewResponse) { + StartLifecyclePolicyPreviewResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(StartLifecyclePolicyPreviewResponse = exports.StartLifecyclePolicyPreviewResponse || (exports.StartLifecyclePolicyPreviewResponse = {})); +var TagResourceRequest; +(function (TagResourceRequest) { + TagResourceRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TagResourceRequest = exports.TagResourceRequest || (exports.TagResourceRequest = {})); +var TagResourceResponse; +(function (TagResourceResponse) { + TagResourceResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TagResourceResponse = exports.TagResourceResponse || (exports.TagResourceResponse = {})); +var UntagResourceRequest; +(function (UntagResourceRequest) { + UntagResourceRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UntagResourceRequest = exports.UntagResourceRequest || (exports.UntagResourceRequest = {})); +var UntagResourceResponse; +(function (UntagResourceResponse) { + UntagResourceResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UntagResourceResponse = exports.UntagResourceResponse || (exports.UntagResourceResponse = {})); +var InvalidLayerPartException; +(function (InvalidLayerPartException) { + InvalidLayerPartException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidLayerPartException = exports.InvalidLayerPartException || (exports.InvalidLayerPartException = {})); +var UploadLayerPartRequest; +(function (UploadLayerPartRequest) { + UploadLayerPartRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UploadLayerPartRequest = exports.UploadLayerPartRequest || (exports.UploadLayerPartRequest = {})); +var UploadLayerPartResponse; +(function (UploadLayerPartResponse) { + UploadLayerPartResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UploadLayerPartResponse = exports.UploadLayerPartResponse || (exports.UploadLayerPartResponse = {})); + + +/***/ }), + +/***/ 862: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateDescribeImageScanFindings = void 0; +const DescribeImageScanFindingsCommand_1 = __nccwpck_require__(2987); +const ECR_1 = __nccwpck_require__(9167); +const ECRClient_1 = __nccwpck_require__(3391); +const makePagedClientRequest = async (client, input, ...args) => { + return await client.send(new DescribeImageScanFindingsCommand_1.DescribeImageScanFindingsCommand(input), ...args); +}; +const makePagedRequest = async (client, input, ...args) => { + return await client.describeImageScanFindings(input, ...args); +}; +async function* paginateDescribeImageScanFindings(config, input, ...additionalArguments) { + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof ECR_1.ECR) { + page = await makePagedRequest(config.client, input, ...additionalArguments); } - if (expected === TYPE_ARRAY_STRING || - expected === TYPE_ARRAY_NUMBER || - expected === TYPE_ARRAY) { - // The expected type can either just be array, - // or it can require a specific subtype (array of numbers). - // - // The simplest case is if "array" with no subtype is specified. - if (expected === TYPE_ARRAY) { - return actual === TYPE_ARRAY; - } else if (actual === TYPE_ARRAY) { - // Otherwise we need to check subtypes. - // I think this has potential to be improved. - var subtype; - if (expected === TYPE_ARRAY_NUMBER) { - subtype = TYPE_NUMBER; - } else if (expected === TYPE_ARRAY_STRING) { - subtype = TYPE_STRING; - } - for (var i = 0; i < argValue.length; i++) { - if (!this._typeMatches( - this._getTypeName(argValue[i]), subtype, - argValue[i])) { - return false; - } - } + else if (config.client instanceof ECRClient_1.ECRClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected ECR | ECRClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + return undefined; +} +exports.paginateDescribeImageScanFindings = paginateDescribeImageScanFindings; + + +/***/ }), + +/***/ 1351: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateDescribeImages = void 0; +const DescribeImagesCommand_1 = __nccwpck_require__(5353); +const ECR_1 = __nccwpck_require__(9167); +const ECRClient_1 = __nccwpck_require__(3391); +const makePagedClientRequest = async (client, input, ...args) => { + return await client.send(new DescribeImagesCommand_1.DescribeImagesCommand(input), ...args); +}; +const makePagedRequest = async (client, input, ...args) => { + return await client.describeImages(input, ...args); +}; +async function* paginateDescribeImages(config, input, ...additionalArguments) { + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof ECR_1.ECR) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof ECRClient_1.ECRClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected ECR | ECRClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + return undefined; +} +exports.paginateDescribeImages = paginateDescribeImages; + + +/***/ }), + +/***/ 9589: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateDescribePullThroughCacheRules = void 0; +const DescribePullThroughCacheRulesCommand_1 = __nccwpck_require__(1484); +const ECR_1 = __nccwpck_require__(9167); +const ECRClient_1 = __nccwpck_require__(3391); +const makePagedClientRequest = async (client, input, ...args) => { + return await client.send(new DescribePullThroughCacheRulesCommand_1.DescribePullThroughCacheRulesCommand(input), ...args); +}; +const makePagedRequest = async (client, input, ...args) => { + return await client.describePullThroughCacheRules(input, ...args); +}; +async function* paginateDescribePullThroughCacheRules(config, input, ...additionalArguments) { + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof ECR_1.ECR) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof ECRClient_1.ECRClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected ECR | ECRClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + return undefined; +} +exports.paginateDescribePullThroughCacheRules = paginateDescribePullThroughCacheRules; + + +/***/ }), + +/***/ 6404: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateDescribeRepositories = void 0; +const DescribeRepositoriesCommand_1 = __nccwpck_require__(1200); +const ECR_1 = __nccwpck_require__(9167); +const ECRClient_1 = __nccwpck_require__(3391); +const makePagedClientRequest = async (client, input, ...args) => { + return await client.send(new DescribeRepositoriesCommand_1.DescribeRepositoriesCommand(input), ...args); +}; +const makePagedRequest = async (client, input, ...args) => { + return await client.describeRepositories(input, ...args); +}; +async function* paginateDescribeRepositories(config, input, ...additionalArguments) { + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof ECR_1.ECR) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof ECRClient_1.ECRClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected ECR | ECRClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + return undefined; +} +exports.paginateDescribeRepositories = paginateDescribeRepositories; + + +/***/ }), + +/***/ 987: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateGetLifecyclePolicyPreview = void 0; +const GetLifecyclePolicyPreviewCommand_1 = __nccwpck_require__(7006); +const ECR_1 = __nccwpck_require__(9167); +const ECRClient_1 = __nccwpck_require__(3391); +const makePagedClientRequest = async (client, input, ...args) => { + return await client.send(new GetLifecyclePolicyPreviewCommand_1.GetLifecyclePolicyPreviewCommand(input), ...args); +}; +const makePagedRequest = async (client, input, ...args) => { + return await client.getLifecyclePolicyPreview(input, ...args); +}; +async function* paginateGetLifecyclePolicyPreview(config, input, ...additionalArguments) { + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof ECR_1.ECR) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof ECRClient_1.ECRClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected ECR | ECRClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + return undefined; +} +exports.paginateGetLifecyclePolicyPreview = paginateGetLifecyclePolicyPreview; + + +/***/ }), + +/***/ 9010: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); + + +/***/ }), + +/***/ 1066: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListImages = void 0; +const ListImagesCommand_1 = __nccwpck_require__(3854); +const ECR_1 = __nccwpck_require__(9167); +const ECRClient_1 = __nccwpck_require__(3391); +const makePagedClientRequest = async (client, input, ...args) => { + return await client.send(new ListImagesCommand_1.ListImagesCommand(input), ...args); +}; +const makePagedRequest = async (client, input, ...args) => { + return await client.listImages(input, ...args); +}; +async function* paginateListImages(config, input, ...additionalArguments) { + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof ECR_1.ECR) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof ECRClient_1.ECRClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected ECR | ECRClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + return undefined; +} +exports.paginateListImages = paginateListImages; + + +/***/ }), + +/***/ 5356: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(862), exports); +tslib_1.__exportStar(__nccwpck_require__(1351), exports); +tslib_1.__exportStar(__nccwpck_require__(9589), exports); +tslib_1.__exportStar(__nccwpck_require__(6404), exports); +tslib_1.__exportStar(__nccwpck_require__(987), exports); +tslib_1.__exportStar(__nccwpck_require__(9010), exports); +tslib_1.__exportStar(__nccwpck_require__(1066), exports); + + +/***/ }), + +/***/ 6704: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.deserializeAws_json1_1DeletePullThroughCacheRuleCommand = exports.deserializeAws_json1_1DeleteLifecyclePolicyCommand = exports.deserializeAws_json1_1CreateRepositoryCommand = exports.deserializeAws_json1_1CreatePullThroughCacheRuleCommand = exports.deserializeAws_json1_1CompleteLayerUploadCommand = exports.deserializeAws_json1_1BatchGetRepositoryScanningConfigurationCommand = exports.deserializeAws_json1_1BatchGetImageCommand = exports.deserializeAws_json1_1BatchDeleteImageCommand = exports.deserializeAws_json1_1BatchCheckLayerAvailabilityCommand = exports.serializeAws_json1_1UploadLayerPartCommand = exports.serializeAws_json1_1UntagResourceCommand = exports.serializeAws_json1_1TagResourceCommand = exports.serializeAws_json1_1StartLifecyclePolicyPreviewCommand = exports.serializeAws_json1_1StartImageScanCommand = exports.serializeAws_json1_1SetRepositoryPolicyCommand = exports.serializeAws_json1_1PutReplicationConfigurationCommand = exports.serializeAws_json1_1PutRegistryScanningConfigurationCommand = exports.serializeAws_json1_1PutRegistryPolicyCommand = exports.serializeAws_json1_1PutLifecyclePolicyCommand = exports.serializeAws_json1_1PutImageTagMutabilityCommand = exports.serializeAws_json1_1PutImageScanningConfigurationCommand = exports.serializeAws_json1_1PutImageCommand = exports.serializeAws_json1_1ListTagsForResourceCommand = exports.serializeAws_json1_1ListImagesCommand = exports.serializeAws_json1_1InitiateLayerUploadCommand = exports.serializeAws_json1_1GetRepositoryPolicyCommand = exports.serializeAws_json1_1GetRegistryScanningConfigurationCommand = exports.serializeAws_json1_1GetRegistryPolicyCommand = exports.serializeAws_json1_1GetLifecyclePolicyPreviewCommand = exports.serializeAws_json1_1GetLifecyclePolicyCommand = exports.serializeAws_json1_1GetDownloadUrlForLayerCommand = exports.serializeAws_json1_1GetAuthorizationTokenCommand = exports.serializeAws_json1_1DescribeRepositoriesCommand = exports.serializeAws_json1_1DescribeRegistryCommand = exports.serializeAws_json1_1DescribePullThroughCacheRulesCommand = exports.serializeAws_json1_1DescribeImageScanFindingsCommand = exports.serializeAws_json1_1DescribeImagesCommand = exports.serializeAws_json1_1DescribeImageReplicationStatusCommand = exports.serializeAws_json1_1DeleteRepositoryPolicyCommand = exports.serializeAws_json1_1DeleteRepositoryCommand = exports.serializeAws_json1_1DeleteRegistryPolicyCommand = exports.serializeAws_json1_1DeletePullThroughCacheRuleCommand = exports.serializeAws_json1_1DeleteLifecyclePolicyCommand = exports.serializeAws_json1_1CreateRepositoryCommand = exports.serializeAws_json1_1CreatePullThroughCacheRuleCommand = exports.serializeAws_json1_1CompleteLayerUploadCommand = exports.serializeAws_json1_1BatchGetRepositoryScanningConfigurationCommand = exports.serializeAws_json1_1BatchGetImageCommand = exports.serializeAws_json1_1BatchDeleteImageCommand = exports.serializeAws_json1_1BatchCheckLayerAvailabilityCommand = void 0; +exports.deserializeAws_json1_1UploadLayerPartCommand = exports.deserializeAws_json1_1UntagResourceCommand = exports.deserializeAws_json1_1TagResourceCommand = exports.deserializeAws_json1_1StartLifecyclePolicyPreviewCommand = exports.deserializeAws_json1_1StartImageScanCommand = exports.deserializeAws_json1_1SetRepositoryPolicyCommand = exports.deserializeAws_json1_1PutReplicationConfigurationCommand = exports.deserializeAws_json1_1PutRegistryScanningConfigurationCommand = exports.deserializeAws_json1_1PutRegistryPolicyCommand = exports.deserializeAws_json1_1PutLifecyclePolicyCommand = exports.deserializeAws_json1_1PutImageTagMutabilityCommand = exports.deserializeAws_json1_1PutImageScanningConfigurationCommand = exports.deserializeAws_json1_1PutImageCommand = exports.deserializeAws_json1_1ListTagsForResourceCommand = exports.deserializeAws_json1_1ListImagesCommand = exports.deserializeAws_json1_1InitiateLayerUploadCommand = exports.deserializeAws_json1_1GetRepositoryPolicyCommand = exports.deserializeAws_json1_1GetRegistryScanningConfigurationCommand = exports.deserializeAws_json1_1GetRegistryPolicyCommand = exports.deserializeAws_json1_1GetLifecyclePolicyPreviewCommand = exports.deserializeAws_json1_1GetLifecyclePolicyCommand = exports.deserializeAws_json1_1GetDownloadUrlForLayerCommand = exports.deserializeAws_json1_1GetAuthorizationTokenCommand = exports.deserializeAws_json1_1DescribeRepositoriesCommand = exports.deserializeAws_json1_1DescribeRegistryCommand = exports.deserializeAws_json1_1DescribePullThroughCacheRulesCommand = exports.deserializeAws_json1_1DescribeImageScanFindingsCommand = exports.deserializeAws_json1_1DescribeImagesCommand = exports.deserializeAws_json1_1DescribeImageReplicationStatusCommand = exports.deserializeAws_json1_1DeleteRepositoryPolicyCommand = exports.deserializeAws_json1_1DeleteRepositoryCommand = exports.deserializeAws_json1_1DeleteRegistryPolicyCommand = void 0; +const protocol_http_1 = __nccwpck_require__(223); +const smithy_client_1 = __nccwpck_require__(4963); +const serializeAws_json1_1BatchCheckLayerAvailabilityCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.BatchCheckLayerAvailability", + }; + let body; + body = JSON.stringify(serializeAws_json1_1BatchCheckLayerAvailabilityRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1BatchCheckLayerAvailabilityCommand = serializeAws_json1_1BatchCheckLayerAvailabilityCommand; +const serializeAws_json1_1BatchDeleteImageCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.BatchDeleteImage", + }; + let body; + body = JSON.stringify(serializeAws_json1_1BatchDeleteImageRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1BatchDeleteImageCommand = serializeAws_json1_1BatchDeleteImageCommand; +const serializeAws_json1_1BatchGetImageCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.BatchGetImage", + }; + let body; + body = JSON.stringify(serializeAws_json1_1BatchGetImageRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1BatchGetImageCommand = serializeAws_json1_1BatchGetImageCommand; +const serializeAws_json1_1BatchGetRepositoryScanningConfigurationCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.BatchGetRepositoryScanningConfiguration", + }; + let body; + body = JSON.stringify(serializeAws_json1_1BatchGetRepositoryScanningConfigurationRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1BatchGetRepositoryScanningConfigurationCommand = serializeAws_json1_1BatchGetRepositoryScanningConfigurationCommand; +const serializeAws_json1_1CompleteLayerUploadCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.CompleteLayerUpload", + }; + let body; + body = JSON.stringify(serializeAws_json1_1CompleteLayerUploadRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1CompleteLayerUploadCommand = serializeAws_json1_1CompleteLayerUploadCommand; +const serializeAws_json1_1CreatePullThroughCacheRuleCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.CreatePullThroughCacheRule", + }; + let body; + body = JSON.stringify(serializeAws_json1_1CreatePullThroughCacheRuleRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1CreatePullThroughCacheRuleCommand = serializeAws_json1_1CreatePullThroughCacheRuleCommand; +const serializeAws_json1_1CreateRepositoryCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.CreateRepository", + }; + let body; + body = JSON.stringify(serializeAws_json1_1CreateRepositoryRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1CreateRepositoryCommand = serializeAws_json1_1CreateRepositoryCommand; +const serializeAws_json1_1DeleteLifecyclePolicyCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.DeleteLifecyclePolicy", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DeleteLifecyclePolicyRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DeleteLifecyclePolicyCommand = serializeAws_json1_1DeleteLifecyclePolicyCommand; +const serializeAws_json1_1DeletePullThroughCacheRuleCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.DeletePullThroughCacheRule", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DeletePullThroughCacheRuleRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DeletePullThroughCacheRuleCommand = serializeAws_json1_1DeletePullThroughCacheRuleCommand; +const serializeAws_json1_1DeleteRegistryPolicyCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.DeleteRegistryPolicy", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DeleteRegistryPolicyRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DeleteRegistryPolicyCommand = serializeAws_json1_1DeleteRegistryPolicyCommand; +const serializeAws_json1_1DeleteRepositoryCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.DeleteRepository", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DeleteRepositoryRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DeleteRepositoryCommand = serializeAws_json1_1DeleteRepositoryCommand; +const serializeAws_json1_1DeleteRepositoryPolicyCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.DeleteRepositoryPolicy", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DeleteRepositoryPolicyRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DeleteRepositoryPolicyCommand = serializeAws_json1_1DeleteRepositoryPolicyCommand; +const serializeAws_json1_1DescribeImageReplicationStatusCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.DescribeImageReplicationStatus", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DescribeImageReplicationStatusRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DescribeImageReplicationStatusCommand = serializeAws_json1_1DescribeImageReplicationStatusCommand; +const serializeAws_json1_1DescribeImagesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.DescribeImages", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DescribeImagesRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DescribeImagesCommand = serializeAws_json1_1DescribeImagesCommand; +const serializeAws_json1_1DescribeImageScanFindingsCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.DescribeImageScanFindings", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DescribeImageScanFindingsRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DescribeImageScanFindingsCommand = serializeAws_json1_1DescribeImageScanFindingsCommand; +const serializeAws_json1_1DescribePullThroughCacheRulesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.DescribePullThroughCacheRules", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DescribePullThroughCacheRulesRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DescribePullThroughCacheRulesCommand = serializeAws_json1_1DescribePullThroughCacheRulesCommand; +const serializeAws_json1_1DescribeRegistryCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.DescribeRegistry", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DescribeRegistryRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DescribeRegistryCommand = serializeAws_json1_1DescribeRegistryCommand; +const serializeAws_json1_1DescribeRepositoriesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.DescribeRepositories", + }; + let body; + body = JSON.stringify(serializeAws_json1_1DescribeRepositoriesRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1DescribeRepositoriesCommand = serializeAws_json1_1DescribeRepositoriesCommand; +const serializeAws_json1_1GetAuthorizationTokenCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.GetAuthorizationToken", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetAuthorizationTokenRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetAuthorizationTokenCommand = serializeAws_json1_1GetAuthorizationTokenCommand; +const serializeAws_json1_1GetDownloadUrlForLayerCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.GetDownloadUrlForLayer", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetDownloadUrlForLayerRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetDownloadUrlForLayerCommand = serializeAws_json1_1GetDownloadUrlForLayerCommand; +const serializeAws_json1_1GetLifecyclePolicyCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.GetLifecyclePolicy", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetLifecyclePolicyRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetLifecyclePolicyCommand = serializeAws_json1_1GetLifecyclePolicyCommand; +const serializeAws_json1_1GetLifecyclePolicyPreviewCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.GetLifecyclePolicyPreview", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetLifecyclePolicyPreviewRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetLifecyclePolicyPreviewCommand = serializeAws_json1_1GetLifecyclePolicyPreviewCommand; +const serializeAws_json1_1GetRegistryPolicyCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.GetRegistryPolicy", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetRegistryPolicyRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetRegistryPolicyCommand = serializeAws_json1_1GetRegistryPolicyCommand; +const serializeAws_json1_1GetRegistryScanningConfigurationCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.GetRegistryScanningConfiguration", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetRegistryScanningConfigurationRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetRegistryScanningConfigurationCommand = serializeAws_json1_1GetRegistryScanningConfigurationCommand; +const serializeAws_json1_1GetRepositoryPolicyCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.GetRepositoryPolicy", + }; + let body; + body = JSON.stringify(serializeAws_json1_1GetRepositoryPolicyRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1GetRepositoryPolicyCommand = serializeAws_json1_1GetRepositoryPolicyCommand; +const serializeAws_json1_1InitiateLayerUploadCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.InitiateLayerUpload", + }; + let body; + body = JSON.stringify(serializeAws_json1_1InitiateLayerUploadRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1InitiateLayerUploadCommand = serializeAws_json1_1InitiateLayerUploadCommand; +const serializeAws_json1_1ListImagesCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.ListImages", + }; + let body; + body = JSON.stringify(serializeAws_json1_1ListImagesRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1ListImagesCommand = serializeAws_json1_1ListImagesCommand; +const serializeAws_json1_1ListTagsForResourceCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.ListTagsForResource", + }; + let body; + body = JSON.stringify(serializeAws_json1_1ListTagsForResourceRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1ListTagsForResourceCommand = serializeAws_json1_1ListTagsForResourceCommand; +const serializeAws_json1_1PutImageCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.PutImage", + }; + let body; + body = JSON.stringify(serializeAws_json1_1PutImageRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1PutImageCommand = serializeAws_json1_1PutImageCommand; +const serializeAws_json1_1PutImageScanningConfigurationCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.PutImageScanningConfiguration", + }; + let body; + body = JSON.stringify(serializeAws_json1_1PutImageScanningConfigurationRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1PutImageScanningConfigurationCommand = serializeAws_json1_1PutImageScanningConfigurationCommand; +const serializeAws_json1_1PutImageTagMutabilityCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.PutImageTagMutability", + }; + let body; + body = JSON.stringify(serializeAws_json1_1PutImageTagMutabilityRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1PutImageTagMutabilityCommand = serializeAws_json1_1PutImageTagMutabilityCommand; +const serializeAws_json1_1PutLifecyclePolicyCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.PutLifecyclePolicy", + }; + let body; + body = JSON.stringify(serializeAws_json1_1PutLifecyclePolicyRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1PutLifecyclePolicyCommand = serializeAws_json1_1PutLifecyclePolicyCommand; +const serializeAws_json1_1PutRegistryPolicyCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.PutRegistryPolicy", + }; + let body; + body = JSON.stringify(serializeAws_json1_1PutRegistryPolicyRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1PutRegistryPolicyCommand = serializeAws_json1_1PutRegistryPolicyCommand; +const serializeAws_json1_1PutRegistryScanningConfigurationCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.PutRegistryScanningConfiguration", + }; + let body; + body = JSON.stringify(serializeAws_json1_1PutRegistryScanningConfigurationRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1PutRegistryScanningConfigurationCommand = serializeAws_json1_1PutRegistryScanningConfigurationCommand; +const serializeAws_json1_1PutReplicationConfigurationCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.PutReplicationConfiguration", + }; + let body; + body = JSON.stringify(serializeAws_json1_1PutReplicationConfigurationRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1PutReplicationConfigurationCommand = serializeAws_json1_1PutReplicationConfigurationCommand; +const serializeAws_json1_1SetRepositoryPolicyCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.SetRepositoryPolicy", + }; + let body; + body = JSON.stringify(serializeAws_json1_1SetRepositoryPolicyRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1SetRepositoryPolicyCommand = serializeAws_json1_1SetRepositoryPolicyCommand; +const serializeAws_json1_1StartImageScanCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.StartImageScan", + }; + let body; + body = JSON.stringify(serializeAws_json1_1StartImageScanRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1StartImageScanCommand = serializeAws_json1_1StartImageScanCommand; +const serializeAws_json1_1StartLifecyclePolicyPreviewCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.StartLifecyclePolicyPreview", + }; + let body; + body = JSON.stringify(serializeAws_json1_1StartLifecyclePolicyPreviewRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1StartLifecyclePolicyPreviewCommand = serializeAws_json1_1StartLifecyclePolicyPreviewCommand; +const serializeAws_json1_1TagResourceCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.TagResource", + }; + let body; + body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1TagResourceCommand = serializeAws_json1_1TagResourceCommand; +const serializeAws_json1_1UntagResourceCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.UntagResource", + }; + let body; + body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1UntagResourceCommand = serializeAws_json1_1UntagResourceCommand; +const serializeAws_json1_1UploadLayerPartCommand = async (input, context) => { + const headers = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AmazonEC2ContainerRegistry_V20150921.UploadLayerPart", + }; + let body; + body = JSON.stringify(serializeAws_json1_1UploadLayerPartRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_json1_1UploadLayerPartCommand = serializeAws_json1_1UploadLayerPartCommand; +const deserializeAws_json1_1BatchCheckLayerAvailabilityCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1BatchCheckLayerAvailabilityCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1BatchCheckLayerAvailabilityResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1BatchCheckLayerAvailabilityCommand = deserializeAws_json1_1BatchCheckLayerAvailabilityCommand; +const deserializeAws_json1_1BatchCheckLayerAvailabilityCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1BatchDeleteImageCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1BatchDeleteImageCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1BatchDeleteImageResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1BatchDeleteImageCommand = deserializeAws_json1_1BatchDeleteImageCommand; +const deserializeAws_json1_1BatchDeleteImageCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1BatchGetImageCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1BatchGetImageCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1BatchGetImageResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1BatchGetImageCommand = deserializeAws_json1_1BatchGetImageCommand; +const deserializeAws_json1_1BatchGetImageCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1BatchGetRepositoryScanningConfigurationCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1BatchGetRepositoryScanningConfigurationCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1BatchGetRepositoryScanningConfigurationResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1BatchGetRepositoryScanningConfigurationCommand = deserializeAws_json1_1BatchGetRepositoryScanningConfigurationCommand; +const deserializeAws_json1_1BatchGetRepositoryScanningConfigurationCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.ecr#ValidationException": + response = { + ...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1CompleteLayerUploadCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1CompleteLayerUploadCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1CompleteLayerUploadResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1CompleteLayerUploadCommand = deserializeAws_json1_1CompleteLayerUploadCommand; +const deserializeAws_json1_1CompleteLayerUploadCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "EmptyUploadException": + case "com.amazonaws.ecr#EmptyUploadException": + response = { + ...(await deserializeAws_json1_1EmptyUploadExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidLayerException": + case "com.amazonaws.ecr#InvalidLayerException": + response = { + ...(await deserializeAws_json1_1InvalidLayerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "KmsException": + case "com.amazonaws.ecr#KmsException": + response = { + ...(await deserializeAws_json1_1KmsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LayerAlreadyExistsException": + case "com.amazonaws.ecr#LayerAlreadyExistsException": + response = { + ...(await deserializeAws_json1_1LayerAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LayerPartTooSmallException": + case "com.amazonaws.ecr#LayerPartTooSmallException": + response = { + ...(await deserializeAws_json1_1LayerPartTooSmallExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UploadNotFoundException": + case "com.amazonaws.ecr#UploadNotFoundException": + response = { + ...(await deserializeAws_json1_1UploadNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1CreatePullThroughCacheRuleCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1CreatePullThroughCacheRuleCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1CreatePullThroughCacheRuleResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1CreatePullThroughCacheRuleCommand = deserializeAws_json1_1CreatePullThroughCacheRuleCommand; +const deserializeAws_json1_1CreatePullThroughCacheRuleCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.ecr#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PullThroughCacheRuleAlreadyExistsException": + case "com.amazonaws.ecr#PullThroughCacheRuleAlreadyExistsException": + response = { + ...(await deserializeAws_json1_1PullThroughCacheRuleAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnsupportedUpstreamRegistryException": + case "com.amazonaws.ecr#UnsupportedUpstreamRegistryException": + response = { + ...(await deserializeAws_json1_1UnsupportedUpstreamRegistryExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.ecr#ValidationException": + response = { + ...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1CreateRepositoryCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1CreateRepositoryCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1CreateRepositoryResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1CreateRepositoryCommand = deserializeAws_json1_1CreateRepositoryCommand; +const deserializeAws_json1_1CreateRepositoryCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidTagParameterException": + case "com.amazonaws.ecr#InvalidTagParameterException": + response = { + ...(await deserializeAws_json1_1InvalidTagParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "KmsException": + case "com.amazonaws.ecr#KmsException": + response = { + ...(await deserializeAws_json1_1KmsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.ecr#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryAlreadyExistsException": + case "com.amazonaws.ecr#RepositoryAlreadyExistsException": + response = { + ...(await deserializeAws_json1_1RepositoryAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyTagsException": + case "com.amazonaws.ecr#TooManyTagsException": + response = { + ...(await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1DeleteLifecyclePolicyCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DeleteLifecyclePolicyCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DeleteLifecyclePolicyResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DeleteLifecyclePolicyCommand = deserializeAws_json1_1DeleteLifecyclePolicyCommand; +const deserializeAws_json1_1DeleteLifecyclePolicyCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LifecyclePolicyNotFoundException": + case "com.amazonaws.ecr#LifecyclePolicyNotFoundException": + response = { + ...(await deserializeAws_json1_1LifecyclePolicyNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1DeletePullThroughCacheRuleCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DeletePullThroughCacheRuleCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DeletePullThroughCacheRuleResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DeletePullThroughCacheRuleCommand = deserializeAws_json1_1DeletePullThroughCacheRuleCommand; +const deserializeAws_json1_1DeletePullThroughCacheRuleCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PullThroughCacheRuleNotFoundException": + case "com.amazonaws.ecr#PullThroughCacheRuleNotFoundException": + response = { + ...(await deserializeAws_json1_1PullThroughCacheRuleNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.ecr#ValidationException": + response = { + ...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1DeleteRegistryPolicyCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DeleteRegistryPolicyCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DeleteRegistryPolicyResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DeleteRegistryPolicyCommand = deserializeAws_json1_1DeleteRegistryPolicyCommand; +const deserializeAws_json1_1DeleteRegistryPolicyCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RegistryPolicyNotFoundException": + case "com.amazonaws.ecr#RegistryPolicyNotFoundException": + response = { + ...(await deserializeAws_json1_1RegistryPolicyNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.ecr#ValidationException": + response = { + ...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1DeleteRepositoryCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DeleteRepositoryCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DeleteRepositoryResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DeleteRepositoryCommand = deserializeAws_json1_1DeleteRepositoryCommand; +const deserializeAws_json1_1DeleteRepositoryCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "KmsException": + case "com.amazonaws.ecr#KmsException": + response = { + ...(await deserializeAws_json1_1KmsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotEmptyException": + case "com.amazonaws.ecr#RepositoryNotEmptyException": + response = { + ...(await deserializeAws_json1_1RepositoryNotEmptyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1DeleteRepositoryPolicyCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DeleteRepositoryPolicyCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DeleteRepositoryPolicyResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DeleteRepositoryPolicyCommand = deserializeAws_json1_1DeleteRepositoryPolicyCommand; +const deserializeAws_json1_1DeleteRepositoryPolicyCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryPolicyNotFoundException": + case "com.amazonaws.ecr#RepositoryPolicyNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryPolicyNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1DescribeImageReplicationStatusCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DescribeImageReplicationStatusCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DescribeImageReplicationStatusResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DescribeImageReplicationStatusCommand = deserializeAws_json1_1DescribeImageReplicationStatusCommand; +const deserializeAws_json1_1DescribeImageReplicationStatusCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ImageNotFoundException": + case "com.amazonaws.ecr#ImageNotFoundException": + response = { + ...(await deserializeAws_json1_1ImageNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.ecr#ValidationException": + response = { + ...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1DescribeImagesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DescribeImagesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DescribeImagesResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DescribeImagesCommand = deserializeAws_json1_1DescribeImagesCommand; +const deserializeAws_json1_1DescribeImagesCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ImageNotFoundException": + case "com.amazonaws.ecr#ImageNotFoundException": + response = { + ...(await deserializeAws_json1_1ImageNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1DescribeImageScanFindingsCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DescribeImageScanFindingsCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DescribeImageScanFindingsResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DescribeImageScanFindingsCommand = deserializeAws_json1_1DescribeImageScanFindingsCommand; +const deserializeAws_json1_1DescribeImageScanFindingsCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ImageNotFoundException": + case "com.amazonaws.ecr#ImageNotFoundException": + response = { + ...(await deserializeAws_json1_1ImageNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ScanNotFoundException": + case "com.amazonaws.ecr#ScanNotFoundException": + response = { + ...(await deserializeAws_json1_1ScanNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.ecr#ValidationException": + response = { + ...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1DescribePullThroughCacheRulesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DescribePullThroughCacheRulesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DescribePullThroughCacheRulesResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DescribePullThroughCacheRulesCommand = deserializeAws_json1_1DescribePullThroughCacheRulesCommand; +const deserializeAws_json1_1DescribePullThroughCacheRulesCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PullThroughCacheRuleNotFoundException": + case "com.amazonaws.ecr#PullThroughCacheRuleNotFoundException": + response = { + ...(await deserializeAws_json1_1PullThroughCacheRuleNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.ecr#ValidationException": + response = { + ...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1DescribeRegistryCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DescribeRegistryCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DescribeRegistryResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DescribeRegistryCommand = deserializeAws_json1_1DescribeRegistryCommand; +const deserializeAws_json1_1DescribeRegistryCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.ecr#ValidationException": + response = { + ...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1DescribeRepositoriesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DescribeRepositoriesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1DescribeRepositoriesResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1DescribeRepositoriesCommand = deserializeAws_json1_1DescribeRepositoriesCommand; +const deserializeAws_json1_1DescribeRepositoriesCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1GetAuthorizationTokenCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetAuthorizationTokenCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetAuthorizationTokenResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetAuthorizationTokenCommand = deserializeAws_json1_1GetAuthorizationTokenCommand; +const deserializeAws_json1_1GetAuthorizationTokenCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1GetDownloadUrlForLayerCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetDownloadUrlForLayerCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetDownloadUrlForLayerResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetDownloadUrlForLayerCommand = deserializeAws_json1_1GetDownloadUrlForLayerCommand; +const deserializeAws_json1_1GetDownloadUrlForLayerCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LayerInaccessibleException": + case "com.amazonaws.ecr#LayerInaccessibleException": + response = { + ...(await deserializeAws_json1_1LayerInaccessibleExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LayersNotFoundException": + case "com.amazonaws.ecr#LayersNotFoundException": + response = { + ...(await deserializeAws_json1_1LayersNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1GetLifecyclePolicyCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetLifecyclePolicyCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetLifecyclePolicyResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetLifecyclePolicyCommand = deserializeAws_json1_1GetLifecyclePolicyCommand; +const deserializeAws_json1_1GetLifecyclePolicyCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LifecyclePolicyNotFoundException": + case "com.amazonaws.ecr#LifecyclePolicyNotFoundException": + response = { + ...(await deserializeAws_json1_1LifecyclePolicyNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1GetLifecyclePolicyPreviewCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetLifecyclePolicyPreviewCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetLifecyclePolicyPreviewResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetLifecyclePolicyPreviewCommand = deserializeAws_json1_1GetLifecyclePolicyPreviewCommand; +const deserializeAws_json1_1GetLifecyclePolicyPreviewCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LifecyclePolicyPreviewNotFoundException": + case "com.amazonaws.ecr#LifecyclePolicyPreviewNotFoundException": + response = { + ...(await deserializeAws_json1_1LifecyclePolicyPreviewNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1GetRegistryPolicyCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetRegistryPolicyCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetRegistryPolicyResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetRegistryPolicyCommand = deserializeAws_json1_1GetRegistryPolicyCommand; +const deserializeAws_json1_1GetRegistryPolicyCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RegistryPolicyNotFoundException": + case "com.amazonaws.ecr#RegistryPolicyNotFoundException": + response = { + ...(await deserializeAws_json1_1RegistryPolicyNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.ecr#ValidationException": + response = { + ...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1GetRegistryScanningConfigurationCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetRegistryScanningConfigurationCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetRegistryScanningConfigurationResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetRegistryScanningConfigurationCommand = deserializeAws_json1_1GetRegistryScanningConfigurationCommand; +const deserializeAws_json1_1GetRegistryScanningConfigurationCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.ecr#ValidationException": + response = { + ...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1GetRepositoryPolicyCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetRepositoryPolicyCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1GetRepositoryPolicyResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1GetRepositoryPolicyCommand = deserializeAws_json1_1GetRepositoryPolicyCommand; +const deserializeAws_json1_1GetRepositoryPolicyCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryPolicyNotFoundException": + case "com.amazonaws.ecr#RepositoryPolicyNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryPolicyNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1InitiateLayerUploadCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1InitiateLayerUploadCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1InitiateLayerUploadResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1InitiateLayerUploadCommand = deserializeAws_json1_1InitiateLayerUploadCommand; +const deserializeAws_json1_1InitiateLayerUploadCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "KmsException": + case "com.amazonaws.ecr#KmsException": + response = { + ...(await deserializeAws_json1_1KmsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1ListImagesCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1ListImagesCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1ListImagesResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1ListImagesCommand = deserializeAws_json1_1ListImagesCommand; +const deserializeAws_json1_1ListImagesCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1ListTagsForResourceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1ListTagsForResourceCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1ListTagsForResourceResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1ListTagsForResourceCommand = deserializeAws_json1_1ListTagsForResourceCommand; +const deserializeAws_json1_1ListTagsForResourceCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1PutImageCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1PutImageCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1PutImageResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1PutImageCommand = deserializeAws_json1_1PutImageCommand; +const deserializeAws_json1_1PutImageCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ImageAlreadyExistsException": + case "com.amazonaws.ecr#ImageAlreadyExistsException": + response = { + ...(await deserializeAws_json1_1ImageAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ImageDigestDoesNotMatchException": + case "com.amazonaws.ecr#ImageDigestDoesNotMatchException": + response = { + ...(await deserializeAws_json1_1ImageDigestDoesNotMatchExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ImageTagAlreadyExistsException": + case "com.amazonaws.ecr#ImageTagAlreadyExistsException": + response = { + ...(await deserializeAws_json1_1ImageTagAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "KmsException": + case "com.amazonaws.ecr#KmsException": + response = { + ...(await deserializeAws_json1_1KmsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LayersNotFoundException": + case "com.amazonaws.ecr#LayersNotFoundException": + response = { + ...(await deserializeAws_json1_1LayersNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.ecr#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ReferencedImagesNotFoundException": + case "com.amazonaws.ecr#ReferencedImagesNotFoundException": + response = { + ...(await deserializeAws_json1_1ReferencedImagesNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1PutImageScanningConfigurationCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1PutImageScanningConfigurationCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1PutImageScanningConfigurationResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1PutImageScanningConfigurationCommand = deserializeAws_json1_1PutImageScanningConfigurationCommand; +const deserializeAws_json1_1PutImageScanningConfigurationCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.ecr#ValidationException": + response = { + ...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1PutImageTagMutabilityCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1PutImageTagMutabilityCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1PutImageTagMutabilityResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1PutImageTagMutabilityCommand = deserializeAws_json1_1PutImageTagMutabilityCommand; +const deserializeAws_json1_1PutImageTagMutabilityCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1PutLifecyclePolicyCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1PutLifecyclePolicyCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1PutLifecyclePolicyResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1PutLifecyclePolicyCommand = deserializeAws_json1_1PutLifecyclePolicyCommand; +const deserializeAws_json1_1PutLifecyclePolicyCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1PutRegistryPolicyCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1PutRegistryPolicyCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1PutRegistryPolicyResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1PutRegistryPolicyCommand = deserializeAws_json1_1PutRegistryPolicyCommand; +const deserializeAws_json1_1PutRegistryPolicyCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.ecr#ValidationException": + response = { + ...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1PutRegistryScanningConfigurationCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1PutRegistryScanningConfigurationCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1PutRegistryScanningConfigurationResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1PutRegistryScanningConfigurationCommand = deserializeAws_json1_1PutRegistryScanningConfigurationCommand; +const deserializeAws_json1_1PutRegistryScanningConfigurationCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.ecr#ValidationException": + response = { + ...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1PutReplicationConfigurationCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1PutReplicationConfigurationCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1PutReplicationConfigurationResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1PutReplicationConfigurationCommand = deserializeAws_json1_1PutReplicationConfigurationCommand; +const deserializeAws_json1_1PutReplicationConfigurationCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.ecr#ValidationException": + response = { + ...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1SetRepositoryPolicyCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1SetRepositoryPolicyCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1SetRepositoryPolicyResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1SetRepositoryPolicyCommand = deserializeAws_json1_1SetRepositoryPolicyCommand; +const deserializeAws_json1_1SetRepositoryPolicyCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1StartImageScanCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1StartImageScanCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1StartImageScanResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1StartImageScanCommand = deserializeAws_json1_1StartImageScanCommand; +const deserializeAws_json1_1StartImageScanCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ImageNotFoundException": + case "com.amazonaws.ecr#ImageNotFoundException": + response = { + ...(await deserializeAws_json1_1ImageNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.ecr#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnsupportedImageTypeException": + case "com.amazonaws.ecr#UnsupportedImageTypeException": + response = { + ...(await deserializeAws_json1_1UnsupportedImageTypeExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.ecr#ValidationException": + response = { + ...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1StartLifecyclePolicyPreviewCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1StartLifecyclePolicyPreviewCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1StartLifecyclePolicyPreviewResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1StartLifecyclePolicyPreviewCommand = deserializeAws_json1_1StartLifecyclePolicyPreviewCommand; +const deserializeAws_json1_1StartLifecyclePolicyPreviewCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LifecyclePolicyNotFoundException": + case "com.amazonaws.ecr#LifecyclePolicyNotFoundException": + response = { + ...(await deserializeAws_json1_1LifecyclePolicyNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LifecyclePolicyPreviewInProgressException": + case "com.amazonaws.ecr#LifecyclePolicyPreviewInProgressException": + response = { + ...(await deserializeAws_json1_1LifecyclePolicyPreviewInProgressExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1TagResourceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1TagResourceCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1TagResourceResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1TagResourceCommand = deserializeAws_json1_1TagResourceCommand; +const deserializeAws_json1_1TagResourceCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidTagParameterException": + case "com.amazonaws.ecr#InvalidTagParameterException": + response = { + ...(await deserializeAws_json1_1InvalidTagParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyTagsException": + case "com.amazonaws.ecr#TooManyTagsException": + response = { + ...(await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1UntagResourceCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1UntagResourceCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1UntagResourceResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1UntagResourceCommand = deserializeAws_json1_1UntagResourceCommand; +const deserializeAws_json1_1UntagResourceCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidTagParameterException": + case "com.amazonaws.ecr#InvalidTagParameterException": + response = { + ...(await deserializeAws_json1_1InvalidTagParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyTagsException": + case "com.amazonaws.ecr#TooManyTagsException": + response = { + ...(await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1UploadLayerPartCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1UploadLayerPartCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_json1_1UploadLayerPartResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_json1_1UploadLayerPartCommand = deserializeAws_json1_1UploadLayerPartCommand; +const deserializeAws_json1_1UploadLayerPartCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidLayerPartException": + case "com.amazonaws.ecr#InvalidLayerPartException": + response = { + ...(await deserializeAws_json1_1InvalidLayerPartExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.ecr#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "KmsException": + case "com.amazonaws.ecr#KmsException": + response = { + ...(await deserializeAws_json1_1KmsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.ecr#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RepositoryNotFoundException": + case "com.amazonaws.ecr#RepositoryNotFoundException": + response = { + ...(await deserializeAws_json1_1RepositoryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServerException": + case "com.amazonaws.ecr#ServerException": + response = { + ...(await deserializeAws_json1_1ServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UploadNotFoundException": + case "com.amazonaws.ecr#UploadNotFoundException": + response = { + ...(await deserializeAws_json1_1UploadNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_json1_1EmptyUploadExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1EmptyUploadException(body, context); + const contents = { + name: "EmptyUploadException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1ImageAlreadyExistsExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1ImageAlreadyExistsException(body, context); + const contents = { + name: "ImageAlreadyExistsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1ImageDigestDoesNotMatchExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1ImageDigestDoesNotMatchException(body, context); + const contents = { + name: "ImageDigestDoesNotMatchException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1ImageNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1ImageNotFoundException(body, context); + const contents = { + name: "ImageNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1ImageTagAlreadyExistsExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1ImageTagAlreadyExistsException(body, context); + const contents = { + name: "ImageTagAlreadyExistsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1InvalidLayerExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1InvalidLayerException(body, context); + const contents = { + name: "InvalidLayerException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1InvalidLayerPartExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1InvalidLayerPartException(body, context); + const contents = { + name: "InvalidLayerPartException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1InvalidParameterExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1InvalidParameterException(body, context); + const contents = { + name: "InvalidParameterException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1InvalidTagParameterExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1InvalidTagParameterException(body, context); + const contents = { + name: "InvalidTagParameterException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1KmsExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1KmsException(body, context); + const contents = { + name: "KmsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1LayerAlreadyExistsExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1LayerAlreadyExistsException(body, context); + const contents = { + name: "LayerAlreadyExistsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1LayerInaccessibleExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1LayerInaccessibleException(body, context); + const contents = { + name: "LayerInaccessibleException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1LayerPartTooSmallExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1LayerPartTooSmallException(body, context); + const contents = { + name: "LayerPartTooSmallException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1LayersNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1LayersNotFoundException(body, context); + const contents = { + name: "LayersNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1LifecyclePolicyNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1LifecyclePolicyNotFoundException(body, context); + const contents = { + name: "LifecyclePolicyNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1LifecyclePolicyPreviewInProgressExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1LifecyclePolicyPreviewInProgressException(body, context); + const contents = { + name: "LifecyclePolicyPreviewInProgressException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1LifecyclePolicyPreviewNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1LifecyclePolicyPreviewNotFoundException(body, context); + const contents = { + name: "LifecyclePolicyPreviewNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1LimitExceededExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1LimitExceededException(body, context); + const contents = { + name: "LimitExceededException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1PullThroughCacheRuleAlreadyExistsExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1PullThroughCacheRuleAlreadyExistsException(body, context); + const contents = { + name: "PullThroughCacheRuleAlreadyExistsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1PullThroughCacheRuleNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1PullThroughCacheRuleNotFoundException(body, context); + const contents = { + name: "PullThroughCacheRuleNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1ReferencedImagesNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1ReferencedImagesNotFoundException(body, context); + const contents = { + name: "ReferencedImagesNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1RegistryPolicyNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1RegistryPolicyNotFoundException(body, context); + const contents = { + name: "RegistryPolicyNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1RepositoryAlreadyExistsExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1RepositoryAlreadyExistsException(body, context); + const contents = { + name: "RepositoryAlreadyExistsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1RepositoryNotEmptyExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1RepositoryNotEmptyException(body, context); + const contents = { + name: "RepositoryNotEmptyException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1RepositoryNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1RepositoryNotFoundException(body, context); + const contents = { + name: "RepositoryNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1RepositoryPolicyNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1RepositoryPolicyNotFoundException(body, context); + const contents = { + name: "RepositoryPolicyNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1ScanNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1ScanNotFoundException(body, context); + const contents = { + name: "ScanNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1ServerExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1ServerException(body, context); + const contents = { + name: "ServerException", + $fault: "server", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1TooManyTagsExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1TooManyTagsException(body, context); + const contents = { + name: "TooManyTagsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1UnsupportedImageTypeExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1UnsupportedImageTypeException(body, context); + const contents = { + name: "UnsupportedImageTypeException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1UnsupportedUpstreamRegistryExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1UnsupportedUpstreamRegistryException(body, context); + const contents = { + name: "UnsupportedUpstreamRegistryException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1UploadNotFoundExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1UploadNotFoundException(body, context); + const contents = { + name: "UploadNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_json1_1ValidationExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_json1_1ValidationException(body, context); + const contents = { + name: "ValidationException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const serializeAws_json1_1BatchCheckLayerAvailabilityRequest = (input, context) => { + return { + ...(input.layerDigests !== undefined && + input.layerDigests !== null && { + layerDigests: serializeAws_json1_1BatchedOperationLayerDigestList(input.layerDigests, context), + }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1BatchDeleteImageRequest = (input, context) => { + return { + ...(input.imageIds !== undefined && + input.imageIds !== null && { imageIds: serializeAws_json1_1ImageIdentifierList(input.imageIds, context) }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1BatchedOperationLayerDigestList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1BatchGetImageRequest = (input, context) => { + return { + ...(input.acceptedMediaTypes !== undefined && + input.acceptedMediaTypes !== null && { + acceptedMediaTypes: serializeAws_json1_1MediaTypeList(input.acceptedMediaTypes, context), + }), + ...(input.imageIds !== undefined && + input.imageIds !== null && { imageIds: serializeAws_json1_1ImageIdentifierList(input.imageIds, context) }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1BatchGetRepositoryScanningConfigurationRequest = (input, context) => { + return { + ...(input.repositoryNames !== undefined && + input.repositoryNames !== null && { + repositoryNames: serializeAws_json1_1ScanningConfigurationRepositoryNameList(input.repositoryNames, context), + }), + }; +}; +const serializeAws_json1_1CompleteLayerUploadRequest = (input, context) => { + return { + ...(input.layerDigests !== undefined && + input.layerDigests !== null && { + layerDigests: serializeAws_json1_1LayerDigestList(input.layerDigests, context), + }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + ...(input.uploadId !== undefined && input.uploadId !== null && { uploadId: input.uploadId }), + }; +}; +const serializeAws_json1_1CreatePullThroughCacheRuleRequest = (input, context) => { + return { + ...(input.ecrRepositoryPrefix !== undefined && + input.ecrRepositoryPrefix !== null && { ecrRepositoryPrefix: input.ecrRepositoryPrefix }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.upstreamRegistryUrl !== undefined && + input.upstreamRegistryUrl !== null && { upstreamRegistryUrl: input.upstreamRegistryUrl }), + }; +}; +const serializeAws_json1_1CreateRepositoryRequest = (input, context) => { + return { + ...(input.encryptionConfiguration !== undefined && + input.encryptionConfiguration !== null && { + encryptionConfiguration: serializeAws_json1_1EncryptionConfiguration(input.encryptionConfiguration, context), + }), + ...(input.imageScanningConfiguration !== undefined && + input.imageScanningConfiguration !== null && { + imageScanningConfiguration: serializeAws_json1_1ImageScanningConfiguration(input.imageScanningConfiguration, context), + }), + ...(input.imageTagMutability !== undefined && + input.imageTagMutability !== null && { imageTagMutability: input.imageTagMutability }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1TagList(input.tags, context) }), + }; +}; +const serializeAws_json1_1DeleteLifecyclePolicyRequest = (input, context) => { + return { + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1DeletePullThroughCacheRuleRequest = (input, context) => { + return { + ...(input.ecrRepositoryPrefix !== undefined && + input.ecrRepositoryPrefix !== null && { ecrRepositoryPrefix: input.ecrRepositoryPrefix }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + }; +}; +const serializeAws_json1_1DeleteRegistryPolicyRequest = (input, context) => { + return {}; +}; +const serializeAws_json1_1DeleteRepositoryPolicyRequest = (input, context) => { + return { + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1DeleteRepositoryRequest = (input, context) => { + return { + ...(input.force !== undefined && input.force !== null && { force: input.force }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1DescribeImageReplicationStatusRequest = (input, context) => { + return { + ...(input.imageId !== undefined && + input.imageId !== null && { imageId: serializeAws_json1_1ImageIdentifier(input.imageId, context) }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1DescribeImageScanFindingsRequest = (input, context) => { + return { + ...(input.imageId !== undefined && + input.imageId !== null && { imageId: serializeAws_json1_1ImageIdentifier(input.imageId, context) }), + ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }), + ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1DescribeImagesFilter = (input, context) => { + return { + ...(input.tagStatus !== undefined && input.tagStatus !== null && { tagStatus: input.tagStatus }), + }; +}; +const serializeAws_json1_1DescribeImagesRequest = (input, context) => { + return { + ...(input.filter !== undefined && + input.filter !== null && { filter: serializeAws_json1_1DescribeImagesFilter(input.filter, context) }), + ...(input.imageIds !== undefined && + input.imageIds !== null && { imageIds: serializeAws_json1_1ImageIdentifierList(input.imageIds, context) }), + ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }), + ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1DescribePullThroughCacheRulesRequest = (input, context) => { + return { + ...(input.ecrRepositoryPrefixes !== undefined && + input.ecrRepositoryPrefixes !== null && { + ecrRepositoryPrefixes: serializeAws_json1_1PullThroughCacheRuleRepositoryPrefixList(input.ecrRepositoryPrefixes, context), + }), + ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }), + ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + }; +}; +const serializeAws_json1_1DescribeRegistryRequest = (input, context) => { + return {}; +}; +const serializeAws_json1_1DescribeRepositoriesRequest = (input, context) => { + return { + ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }), + ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryNames !== undefined && + input.repositoryNames !== null && { + repositoryNames: serializeAws_json1_1RepositoryNameList(input.repositoryNames, context), + }), + }; +}; +const serializeAws_json1_1EncryptionConfiguration = (input, context) => { + return { + ...(input.encryptionType !== undefined && + input.encryptionType !== null && { encryptionType: input.encryptionType }), + ...(input.kmsKey !== undefined && input.kmsKey !== null && { kmsKey: input.kmsKey }), + }; +}; +const serializeAws_json1_1GetAuthorizationTokenRegistryIdList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1GetAuthorizationTokenRequest = (input, context) => { + return { + ...(input.registryIds !== undefined && + input.registryIds !== null && { + registryIds: serializeAws_json1_1GetAuthorizationTokenRegistryIdList(input.registryIds, context), + }), + }; +}; +const serializeAws_json1_1GetDownloadUrlForLayerRequest = (input, context) => { + return { + ...(input.layerDigest !== undefined && input.layerDigest !== null && { layerDigest: input.layerDigest }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1GetLifecyclePolicyPreviewRequest = (input, context) => { + return { + ...(input.filter !== undefined && + input.filter !== null && { filter: serializeAws_json1_1LifecyclePolicyPreviewFilter(input.filter, context) }), + ...(input.imageIds !== undefined && + input.imageIds !== null && { imageIds: serializeAws_json1_1ImageIdentifierList(input.imageIds, context) }), + ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }), + ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1GetLifecyclePolicyRequest = (input, context) => { + return { + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1GetRegistryPolicyRequest = (input, context) => { + return {}; +}; +const serializeAws_json1_1GetRegistryScanningConfigurationRequest = (input, context) => { + return {}; +}; +const serializeAws_json1_1GetRepositoryPolicyRequest = (input, context) => { + return { + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1ImageIdentifier = (input, context) => { + return { + ...(input.imageDigest !== undefined && input.imageDigest !== null && { imageDigest: input.imageDigest }), + ...(input.imageTag !== undefined && input.imageTag !== null && { imageTag: input.imageTag }), + }; +}; +const serializeAws_json1_1ImageIdentifierList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_json1_1ImageIdentifier(entry, context); + }); +}; +const serializeAws_json1_1ImageScanningConfiguration = (input, context) => { + return { + ...(input.scanOnPush !== undefined && input.scanOnPush !== null && { scanOnPush: input.scanOnPush }), + }; +}; +const serializeAws_json1_1InitiateLayerUploadRequest = (input, context) => { + return { + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1LayerDigestList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1LifecyclePolicyPreviewFilter = (input, context) => { + return { + ...(input.tagStatus !== undefined && input.tagStatus !== null && { tagStatus: input.tagStatus }), + }; +}; +const serializeAws_json1_1ListImagesFilter = (input, context) => { + return { + ...(input.tagStatus !== undefined && input.tagStatus !== null && { tagStatus: input.tagStatus }), + }; +}; +const serializeAws_json1_1ListImagesRequest = (input, context) => { + return { + ...(input.filter !== undefined && + input.filter !== null && { filter: serializeAws_json1_1ListImagesFilter(input.filter, context) }), + ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }), + ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1ListTagsForResourceRequest = (input, context) => { + return { + ...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }), + }; +}; +const serializeAws_json1_1MediaTypeList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1PullThroughCacheRuleRepositoryPrefixList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1PutImageRequest = (input, context) => { + return { + ...(input.imageDigest !== undefined && input.imageDigest !== null && { imageDigest: input.imageDigest }), + ...(input.imageManifest !== undefined && input.imageManifest !== null && { imageManifest: input.imageManifest }), + ...(input.imageManifestMediaType !== undefined && + input.imageManifestMediaType !== null && { imageManifestMediaType: input.imageManifestMediaType }), + ...(input.imageTag !== undefined && input.imageTag !== null && { imageTag: input.imageTag }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1PutImageScanningConfigurationRequest = (input, context) => { + return { + ...(input.imageScanningConfiguration !== undefined && + input.imageScanningConfiguration !== null && { + imageScanningConfiguration: serializeAws_json1_1ImageScanningConfiguration(input.imageScanningConfiguration, context), + }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1PutImageTagMutabilityRequest = (input, context) => { + return { + ...(input.imageTagMutability !== undefined && + input.imageTagMutability !== null && { imageTagMutability: input.imageTagMutability }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1PutLifecyclePolicyRequest = (input, context) => { + return { + ...(input.lifecyclePolicyText !== undefined && + input.lifecyclePolicyText !== null && { lifecyclePolicyText: input.lifecyclePolicyText }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1PutRegistryPolicyRequest = (input, context) => { + return { + ...(input.policyText !== undefined && input.policyText !== null && { policyText: input.policyText }), + }; +}; +const serializeAws_json1_1PutRegistryScanningConfigurationRequest = (input, context) => { + return { + ...(input.rules !== undefined && + input.rules !== null && { rules: serializeAws_json1_1RegistryScanningRuleList(input.rules, context) }), + ...(input.scanType !== undefined && input.scanType !== null && { scanType: input.scanType }), + }; +}; +const serializeAws_json1_1PutReplicationConfigurationRequest = (input, context) => { + return { + ...(input.replicationConfiguration !== undefined && + input.replicationConfiguration !== null && { + replicationConfiguration: serializeAws_json1_1ReplicationConfiguration(input.replicationConfiguration, context), + }), + }; +}; +const serializeAws_json1_1RegistryScanningRule = (input, context) => { + return { + ...(input.repositoryFilters !== undefined && + input.repositoryFilters !== null && { + repositoryFilters: serializeAws_json1_1ScanningRepositoryFilterList(input.repositoryFilters, context), + }), + ...(input.scanFrequency !== undefined && input.scanFrequency !== null && { scanFrequency: input.scanFrequency }), + }; +}; +const serializeAws_json1_1RegistryScanningRuleList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_json1_1RegistryScanningRule(entry, context); + }); +}; +const serializeAws_json1_1ReplicationConfiguration = (input, context) => { + return { + ...(input.rules !== undefined && + input.rules !== null && { rules: serializeAws_json1_1ReplicationRuleList(input.rules, context) }), + }; +}; +const serializeAws_json1_1ReplicationDestination = (input, context) => { + return { + ...(input.region !== undefined && input.region !== null && { region: input.region }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + }; +}; +const serializeAws_json1_1ReplicationDestinationList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_json1_1ReplicationDestination(entry, context); + }); +}; +const serializeAws_json1_1ReplicationRule = (input, context) => { + return { + ...(input.destinations !== undefined && + input.destinations !== null && { + destinations: serializeAws_json1_1ReplicationDestinationList(input.destinations, context), + }), + ...(input.repositoryFilters !== undefined && + input.repositoryFilters !== null && { + repositoryFilters: serializeAws_json1_1RepositoryFilterList(input.repositoryFilters, context), + }), + }; +}; +const serializeAws_json1_1ReplicationRuleList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_json1_1ReplicationRule(entry, context); + }); +}; +const serializeAws_json1_1RepositoryFilter = (input, context) => { + return { + ...(input.filter !== undefined && input.filter !== null && { filter: input.filter }), + ...(input.filterType !== undefined && input.filterType !== null && { filterType: input.filterType }), + }; +}; +const serializeAws_json1_1RepositoryFilterList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_json1_1RepositoryFilter(entry, context); + }); +}; +const serializeAws_json1_1RepositoryNameList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1ScanningConfigurationRepositoryNameList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1ScanningRepositoryFilter = (input, context) => { + return { + ...(input.filter !== undefined && input.filter !== null && { filter: input.filter }), + ...(input.filterType !== undefined && input.filterType !== null && { filterType: input.filterType }), + }; +}; +const serializeAws_json1_1ScanningRepositoryFilterList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_json1_1ScanningRepositoryFilter(entry, context); + }); +}; +const serializeAws_json1_1SetRepositoryPolicyRequest = (input, context) => { + return { + ...(input.force !== undefined && input.force !== null && { force: input.force }), + ...(input.policyText !== undefined && input.policyText !== null && { policyText: input.policyText }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1StartImageScanRequest = (input, context) => { + return { + ...(input.imageId !== undefined && + input.imageId !== null && { imageId: serializeAws_json1_1ImageIdentifier(input.imageId, context) }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1StartLifecyclePolicyPreviewRequest = (input, context) => { + return { + ...(input.lifecyclePolicyText !== undefined && + input.lifecyclePolicyText !== null && { lifecyclePolicyText: input.lifecyclePolicyText }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + }; +}; +const serializeAws_json1_1Tag = (input, context) => { + return { + ...(input.Key !== undefined && input.Key !== null && { Key: input.Key }), + ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }), + }; +}; +const serializeAws_json1_1TagKeyList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return entry; + }); +}; +const serializeAws_json1_1TagList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return serializeAws_json1_1Tag(entry, context); + }); +}; +const serializeAws_json1_1TagResourceRequest = (input, context) => { + return { + ...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }), + ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1TagList(input.tags, context) }), + }; +}; +const serializeAws_json1_1UntagResourceRequest = (input, context) => { + return { + ...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }), + ...(input.tagKeys !== undefined && + input.tagKeys !== null && { tagKeys: serializeAws_json1_1TagKeyList(input.tagKeys, context) }), + }; +}; +const serializeAws_json1_1UploadLayerPartRequest = (input, context) => { + return { + ...(input.layerPartBlob !== undefined && + input.layerPartBlob !== null && { layerPartBlob: context.base64Encoder(input.layerPartBlob) }), + ...(input.partFirstByte !== undefined && input.partFirstByte !== null && { partFirstByte: input.partFirstByte }), + ...(input.partLastByte !== undefined && input.partLastByte !== null && { partLastByte: input.partLastByte }), + ...(input.registryId !== undefined && input.registryId !== null && { registryId: input.registryId }), + ...(input.repositoryName !== undefined && + input.repositoryName !== null && { repositoryName: input.repositoryName }), + ...(input.uploadId !== undefined && input.uploadId !== null && { uploadId: input.uploadId }), + }; +}; +const deserializeAws_json1_1Attribute = (output, context) => { + return { + key: smithy_client_1.expectString(output.key), + value: smithy_client_1.expectString(output.value), + }; +}; +const deserializeAws_json1_1AttributeList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1Attribute(entry, context); + }); +}; +const deserializeAws_json1_1AuthorizationData = (output, context) => { + return { + authorizationToken: smithy_client_1.expectString(output.authorizationToken), + expiresAt: output.expiresAt !== undefined && output.expiresAt !== null + ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.expiresAt))) + : undefined, + proxyEndpoint: smithy_client_1.expectString(output.proxyEndpoint), + }; +}; +const deserializeAws_json1_1AuthorizationDataList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1AuthorizationData(entry, context); + }); +}; +const deserializeAws_json1_1AwsEcrContainerImageDetails = (output, context) => { + return { + architecture: smithy_client_1.expectString(output.architecture), + author: smithy_client_1.expectString(output.author), + imageHash: smithy_client_1.expectString(output.imageHash), + imageTags: output.imageTags !== undefined && output.imageTags !== null + ? deserializeAws_json1_1ImageTagsList(output.imageTags, context) + : undefined, + platform: smithy_client_1.expectString(output.platform), + pushedAt: output.pushedAt !== undefined && output.pushedAt !== null + ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.pushedAt))) + : undefined, + registry: smithy_client_1.expectString(output.registry), + repositoryName: smithy_client_1.expectString(output.repositoryName), + }; +}; +const deserializeAws_json1_1BatchCheckLayerAvailabilityResponse = (output, context) => { + return { + failures: output.failures !== undefined && output.failures !== null + ? deserializeAws_json1_1LayerFailureList(output.failures, context) + : undefined, + layers: output.layers !== undefined && output.layers !== null + ? deserializeAws_json1_1LayerList(output.layers, context) + : undefined, + }; +}; +const deserializeAws_json1_1BatchDeleteImageResponse = (output, context) => { + return { + failures: output.failures !== undefined && output.failures !== null + ? deserializeAws_json1_1ImageFailureList(output.failures, context) + : undefined, + imageIds: output.imageIds !== undefined && output.imageIds !== null + ? deserializeAws_json1_1ImageIdentifierList(output.imageIds, context) + : undefined, + }; +}; +const deserializeAws_json1_1BatchGetImageResponse = (output, context) => { + return { + failures: output.failures !== undefined && output.failures !== null + ? deserializeAws_json1_1ImageFailureList(output.failures, context) + : undefined, + images: output.images !== undefined && output.images !== null + ? deserializeAws_json1_1ImageList(output.images, context) + : undefined, + }; +}; +const deserializeAws_json1_1BatchGetRepositoryScanningConfigurationResponse = (output, context) => { + return { + failures: output.failures !== undefined && output.failures !== null + ? deserializeAws_json1_1RepositoryScanningConfigurationFailureList(output.failures, context) + : undefined, + scanningConfigurations: output.scanningConfigurations !== undefined && output.scanningConfigurations !== null + ? deserializeAws_json1_1RepositoryScanningConfigurationList(output.scanningConfigurations, context) + : undefined, + }; +}; +const deserializeAws_json1_1CompleteLayerUploadResponse = (output, context) => { + return { + layerDigest: smithy_client_1.expectString(output.layerDigest), + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + uploadId: smithy_client_1.expectString(output.uploadId), + }; +}; +const deserializeAws_json1_1CreatePullThroughCacheRuleResponse = (output, context) => { + return { + createdAt: output.createdAt !== undefined && output.createdAt !== null + ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.createdAt))) + : undefined, + ecrRepositoryPrefix: smithy_client_1.expectString(output.ecrRepositoryPrefix), + registryId: smithy_client_1.expectString(output.registryId), + upstreamRegistryUrl: smithy_client_1.expectString(output.upstreamRegistryUrl), + }; +}; +const deserializeAws_json1_1CreateRepositoryResponse = (output, context) => { + return { + repository: output.repository !== undefined && output.repository !== null + ? deserializeAws_json1_1Repository(output.repository, context) + : undefined, + }; +}; +const deserializeAws_json1_1CvssScore = (output, context) => { + return { + baseScore: smithy_client_1.limitedParseDouble(output.baseScore), + scoringVector: smithy_client_1.expectString(output.scoringVector), + source: smithy_client_1.expectString(output.source), + version: smithy_client_1.expectString(output.version), + }; +}; +const deserializeAws_json1_1CvssScoreAdjustment = (output, context) => { + return { + metric: smithy_client_1.expectString(output.metric), + reason: smithy_client_1.expectString(output.reason), + }; +}; +const deserializeAws_json1_1CvssScoreAdjustmentList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1CvssScoreAdjustment(entry, context); + }); +}; +const deserializeAws_json1_1CvssScoreDetails = (output, context) => { + return { + adjustments: output.adjustments !== undefined && output.adjustments !== null + ? deserializeAws_json1_1CvssScoreAdjustmentList(output.adjustments, context) + : undefined, + score: smithy_client_1.limitedParseDouble(output.score), + scoreSource: smithy_client_1.expectString(output.scoreSource), + scoringVector: smithy_client_1.expectString(output.scoringVector), + version: smithy_client_1.expectString(output.version), + }; +}; +const deserializeAws_json1_1CvssScoreList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1CvssScore(entry, context); + }); +}; +const deserializeAws_json1_1DeleteLifecyclePolicyResponse = (output, context) => { + return { + lastEvaluatedAt: output.lastEvaluatedAt !== undefined && output.lastEvaluatedAt !== null + ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.lastEvaluatedAt))) + : undefined, + lifecyclePolicyText: smithy_client_1.expectString(output.lifecyclePolicyText), + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + }; +}; +const deserializeAws_json1_1DeletePullThroughCacheRuleResponse = (output, context) => { + return { + createdAt: output.createdAt !== undefined && output.createdAt !== null + ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.createdAt))) + : undefined, + ecrRepositoryPrefix: smithy_client_1.expectString(output.ecrRepositoryPrefix), + registryId: smithy_client_1.expectString(output.registryId), + upstreamRegistryUrl: smithy_client_1.expectString(output.upstreamRegistryUrl), + }; +}; +const deserializeAws_json1_1DeleteRegistryPolicyResponse = (output, context) => { + return { + policyText: smithy_client_1.expectString(output.policyText), + registryId: smithy_client_1.expectString(output.registryId), + }; +}; +const deserializeAws_json1_1DeleteRepositoryPolicyResponse = (output, context) => { + return { + policyText: smithy_client_1.expectString(output.policyText), + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + }; +}; +const deserializeAws_json1_1DeleteRepositoryResponse = (output, context) => { + return { + repository: output.repository !== undefined && output.repository !== null + ? deserializeAws_json1_1Repository(output.repository, context) + : undefined, + }; +}; +const deserializeAws_json1_1DescribeImageReplicationStatusResponse = (output, context) => { + return { + imageId: output.imageId !== undefined && output.imageId !== null + ? deserializeAws_json1_1ImageIdentifier(output.imageId, context) + : undefined, + replicationStatuses: output.replicationStatuses !== undefined && output.replicationStatuses !== null + ? deserializeAws_json1_1ImageReplicationStatusList(output.replicationStatuses, context) + : undefined, + repositoryName: smithy_client_1.expectString(output.repositoryName), + }; +}; +const deserializeAws_json1_1DescribeImageScanFindingsResponse = (output, context) => { + return { + imageId: output.imageId !== undefined && output.imageId !== null + ? deserializeAws_json1_1ImageIdentifier(output.imageId, context) + : undefined, + imageScanFindings: output.imageScanFindings !== undefined && output.imageScanFindings !== null + ? deserializeAws_json1_1ImageScanFindings(output.imageScanFindings, context) + : undefined, + imageScanStatus: output.imageScanStatus !== undefined && output.imageScanStatus !== null + ? deserializeAws_json1_1ImageScanStatus(output.imageScanStatus, context) + : undefined, + nextToken: smithy_client_1.expectString(output.nextToken), + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + }; +}; +const deserializeAws_json1_1DescribeImagesResponse = (output, context) => { + return { + imageDetails: output.imageDetails !== undefined && output.imageDetails !== null + ? deserializeAws_json1_1ImageDetailList(output.imageDetails, context) + : undefined, + nextToken: smithy_client_1.expectString(output.nextToken), + }; +}; +const deserializeAws_json1_1DescribePullThroughCacheRulesResponse = (output, context) => { + return { + nextToken: smithy_client_1.expectString(output.nextToken), + pullThroughCacheRules: output.pullThroughCacheRules !== undefined && output.pullThroughCacheRules !== null + ? deserializeAws_json1_1PullThroughCacheRuleList(output.pullThroughCacheRules, context) + : undefined, + }; +}; +const deserializeAws_json1_1DescribeRegistryResponse = (output, context) => { + return { + registryId: smithy_client_1.expectString(output.registryId), + replicationConfiguration: output.replicationConfiguration !== undefined && output.replicationConfiguration !== null + ? deserializeAws_json1_1ReplicationConfiguration(output.replicationConfiguration, context) + : undefined, + }; +}; +const deserializeAws_json1_1DescribeRepositoriesResponse = (output, context) => { + return { + nextToken: smithy_client_1.expectString(output.nextToken), + repositories: output.repositories !== undefined && output.repositories !== null + ? deserializeAws_json1_1RepositoryList(output.repositories, context) + : undefined, + }; +}; +const deserializeAws_json1_1EmptyUploadException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1EncryptionConfiguration = (output, context) => { + return { + encryptionType: smithy_client_1.expectString(output.encryptionType), + kmsKey: smithy_client_1.expectString(output.kmsKey), + }; +}; +const deserializeAws_json1_1EnhancedImageScanFinding = (output, context) => { + return { + awsAccountId: smithy_client_1.expectString(output.awsAccountId), + description: smithy_client_1.expectString(output.description), + findingArn: smithy_client_1.expectString(output.findingArn), + firstObservedAt: output.firstObservedAt !== undefined && output.firstObservedAt !== null + ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.firstObservedAt))) + : undefined, + lastObservedAt: output.lastObservedAt !== undefined && output.lastObservedAt !== null + ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.lastObservedAt))) + : undefined, + packageVulnerabilityDetails: output.packageVulnerabilityDetails !== undefined && output.packageVulnerabilityDetails !== null + ? deserializeAws_json1_1PackageVulnerabilityDetails(output.packageVulnerabilityDetails, context) + : undefined, + remediation: output.remediation !== undefined && output.remediation !== null + ? deserializeAws_json1_1Remediation(output.remediation, context) + : undefined, + resources: output.resources !== undefined && output.resources !== null + ? deserializeAws_json1_1ResourceList(output.resources, context) + : undefined, + score: smithy_client_1.limitedParseDouble(output.score), + scoreDetails: output.scoreDetails !== undefined && output.scoreDetails !== null + ? deserializeAws_json1_1ScoreDetails(output.scoreDetails, context) + : undefined, + severity: smithy_client_1.expectString(output.severity), + status: smithy_client_1.expectString(output.status), + title: smithy_client_1.expectString(output.title), + type: smithy_client_1.expectString(output.type), + updatedAt: output.updatedAt !== undefined && output.updatedAt !== null + ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.updatedAt))) + : undefined, + }; +}; +const deserializeAws_json1_1EnhancedImageScanFindingList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1EnhancedImageScanFinding(entry, context); + }); +}; +const deserializeAws_json1_1FindingSeverityCounts = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: smithy_client_1.expectInt32(value), + }; + }, {}); +}; +const deserializeAws_json1_1GetAuthorizationTokenResponse = (output, context) => { + return { + authorizationData: output.authorizationData !== undefined && output.authorizationData !== null + ? deserializeAws_json1_1AuthorizationDataList(output.authorizationData, context) + : undefined, + }; +}; +const deserializeAws_json1_1GetDownloadUrlForLayerResponse = (output, context) => { + return { + downloadUrl: smithy_client_1.expectString(output.downloadUrl), + layerDigest: smithy_client_1.expectString(output.layerDigest), + }; +}; +const deserializeAws_json1_1GetLifecyclePolicyPreviewResponse = (output, context) => { + return { + lifecyclePolicyText: smithy_client_1.expectString(output.lifecyclePolicyText), + nextToken: smithy_client_1.expectString(output.nextToken), + previewResults: output.previewResults !== undefined && output.previewResults !== null + ? deserializeAws_json1_1LifecyclePolicyPreviewResultList(output.previewResults, context) + : undefined, + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + status: smithy_client_1.expectString(output.status), + summary: output.summary !== undefined && output.summary !== null + ? deserializeAws_json1_1LifecyclePolicyPreviewSummary(output.summary, context) + : undefined, + }; +}; +const deserializeAws_json1_1GetLifecyclePolicyResponse = (output, context) => { + return { + lastEvaluatedAt: output.lastEvaluatedAt !== undefined && output.lastEvaluatedAt !== null + ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.lastEvaluatedAt))) + : undefined, + lifecyclePolicyText: smithy_client_1.expectString(output.lifecyclePolicyText), + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + }; +}; +const deserializeAws_json1_1GetRegistryPolicyResponse = (output, context) => { + return { + policyText: smithy_client_1.expectString(output.policyText), + registryId: smithy_client_1.expectString(output.registryId), + }; +}; +const deserializeAws_json1_1GetRegistryScanningConfigurationResponse = (output, context) => { + return { + registryId: smithy_client_1.expectString(output.registryId), + scanningConfiguration: output.scanningConfiguration !== undefined && output.scanningConfiguration !== null + ? deserializeAws_json1_1RegistryScanningConfiguration(output.scanningConfiguration, context) + : undefined, + }; +}; +const deserializeAws_json1_1GetRepositoryPolicyResponse = (output, context) => { + return { + policyText: smithy_client_1.expectString(output.policyText), + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + }; +}; +const deserializeAws_json1_1Image = (output, context) => { + return { + imageId: output.imageId !== undefined && output.imageId !== null + ? deserializeAws_json1_1ImageIdentifier(output.imageId, context) + : undefined, + imageManifest: smithy_client_1.expectString(output.imageManifest), + imageManifestMediaType: smithy_client_1.expectString(output.imageManifestMediaType), + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + }; +}; +const deserializeAws_json1_1ImageAlreadyExistsException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1ImageDetail = (output, context) => { + return { + artifactMediaType: smithy_client_1.expectString(output.artifactMediaType), + imageDigest: smithy_client_1.expectString(output.imageDigest), + imageManifestMediaType: smithy_client_1.expectString(output.imageManifestMediaType), + imagePushedAt: output.imagePushedAt !== undefined && output.imagePushedAt !== null + ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.imagePushedAt))) + : undefined, + imageScanFindingsSummary: output.imageScanFindingsSummary !== undefined && output.imageScanFindingsSummary !== null + ? deserializeAws_json1_1ImageScanFindingsSummary(output.imageScanFindingsSummary, context) + : undefined, + imageScanStatus: output.imageScanStatus !== undefined && output.imageScanStatus !== null + ? deserializeAws_json1_1ImageScanStatus(output.imageScanStatus, context) + : undefined, + imageSizeInBytes: smithy_client_1.expectLong(output.imageSizeInBytes), + imageTags: output.imageTags !== undefined && output.imageTags !== null + ? deserializeAws_json1_1ImageTagList(output.imageTags, context) + : undefined, + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + }; +}; +const deserializeAws_json1_1ImageDetailList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1ImageDetail(entry, context); + }); +}; +const deserializeAws_json1_1ImageDigestDoesNotMatchException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1ImageFailure = (output, context) => { + return { + failureCode: smithy_client_1.expectString(output.failureCode), + failureReason: smithy_client_1.expectString(output.failureReason), + imageId: output.imageId !== undefined && output.imageId !== null + ? deserializeAws_json1_1ImageIdentifier(output.imageId, context) + : undefined, + }; +}; +const deserializeAws_json1_1ImageFailureList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1ImageFailure(entry, context); + }); +}; +const deserializeAws_json1_1ImageIdentifier = (output, context) => { + return { + imageDigest: smithy_client_1.expectString(output.imageDigest), + imageTag: smithy_client_1.expectString(output.imageTag), + }; +}; +const deserializeAws_json1_1ImageIdentifierList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1ImageIdentifier(entry, context); + }); +}; +const deserializeAws_json1_1ImageList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1Image(entry, context); + }); +}; +const deserializeAws_json1_1ImageNotFoundException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1ImageReplicationStatus = (output, context) => { + return { + failureCode: smithy_client_1.expectString(output.failureCode), + region: smithy_client_1.expectString(output.region), + registryId: smithy_client_1.expectString(output.registryId), + status: smithy_client_1.expectString(output.status), + }; +}; +const deserializeAws_json1_1ImageReplicationStatusList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1ImageReplicationStatus(entry, context); + }); +}; +const deserializeAws_json1_1ImageScanFinding = (output, context) => { + return { + attributes: output.attributes !== undefined && output.attributes !== null + ? deserializeAws_json1_1AttributeList(output.attributes, context) + : undefined, + description: smithy_client_1.expectString(output.description), + name: smithy_client_1.expectString(output.name), + severity: smithy_client_1.expectString(output.severity), + uri: smithy_client_1.expectString(output.uri), + }; +}; +const deserializeAws_json1_1ImageScanFindingList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1ImageScanFinding(entry, context); + }); +}; +const deserializeAws_json1_1ImageScanFindings = (output, context) => { + return { + enhancedFindings: output.enhancedFindings !== undefined && output.enhancedFindings !== null + ? deserializeAws_json1_1EnhancedImageScanFindingList(output.enhancedFindings, context) + : undefined, + findingSeverityCounts: output.findingSeverityCounts !== undefined && output.findingSeverityCounts !== null + ? deserializeAws_json1_1FindingSeverityCounts(output.findingSeverityCounts, context) + : undefined, + findings: output.findings !== undefined && output.findings !== null + ? deserializeAws_json1_1ImageScanFindingList(output.findings, context) + : undefined, + imageScanCompletedAt: output.imageScanCompletedAt !== undefined && output.imageScanCompletedAt !== null + ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.imageScanCompletedAt))) + : undefined, + vulnerabilitySourceUpdatedAt: output.vulnerabilitySourceUpdatedAt !== undefined && output.vulnerabilitySourceUpdatedAt !== null + ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.vulnerabilitySourceUpdatedAt))) + : undefined, + }; +}; +const deserializeAws_json1_1ImageScanFindingsSummary = (output, context) => { + return { + findingSeverityCounts: output.findingSeverityCounts !== undefined && output.findingSeverityCounts !== null + ? deserializeAws_json1_1FindingSeverityCounts(output.findingSeverityCounts, context) + : undefined, + imageScanCompletedAt: output.imageScanCompletedAt !== undefined && output.imageScanCompletedAt !== null + ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.imageScanCompletedAt))) + : undefined, + vulnerabilitySourceUpdatedAt: output.vulnerabilitySourceUpdatedAt !== undefined && output.vulnerabilitySourceUpdatedAt !== null + ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.vulnerabilitySourceUpdatedAt))) + : undefined, + }; +}; +const deserializeAws_json1_1ImageScanningConfiguration = (output, context) => { + return { + scanOnPush: smithy_client_1.expectBoolean(output.scanOnPush), + }; +}; +const deserializeAws_json1_1ImageScanStatus = (output, context) => { + return { + description: smithy_client_1.expectString(output.description), + status: smithy_client_1.expectString(output.status), + }; +}; +const deserializeAws_json1_1ImageTagAlreadyExistsException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1ImageTagList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return smithy_client_1.expectString(entry); + }); +}; +const deserializeAws_json1_1ImageTagsList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return smithy_client_1.expectString(entry); + }); +}; +const deserializeAws_json1_1InitiateLayerUploadResponse = (output, context) => { + return { + partSize: smithy_client_1.expectLong(output.partSize), + uploadId: smithy_client_1.expectString(output.uploadId), + }; +}; +const deserializeAws_json1_1InvalidLayerException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1InvalidLayerPartException = (output, context) => { + return { + lastValidByteReceived: smithy_client_1.expectLong(output.lastValidByteReceived), + message: smithy_client_1.expectString(output.message), + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + uploadId: smithy_client_1.expectString(output.uploadId), + }; +}; +const deserializeAws_json1_1InvalidParameterException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1InvalidTagParameterException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1KmsException = (output, context) => { + return { + kmsError: smithy_client_1.expectString(output.kmsError), + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1Layer = (output, context) => { + return { + layerAvailability: smithy_client_1.expectString(output.layerAvailability), + layerDigest: smithy_client_1.expectString(output.layerDigest), + layerSize: smithy_client_1.expectLong(output.layerSize), + mediaType: smithy_client_1.expectString(output.mediaType), + }; +}; +const deserializeAws_json1_1LayerAlreadyExistsException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1LayerFailure = (output, context) => { + return { + failureCode: smithy_client_1.expectString(output.failureCode), + failureReason: smithy_client_1.expectString(output.failureReason), + layerDigest: smithy_client_1.expectString(output.layerDigest), + }; +}; +const deserializeAws_json1_1LayerFailureList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1LayerFailure(entry, context); + }); +}; +const deserializeAws_json1_1LayerInaccessibleException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1LayerList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1Layer(entry, context); + }); +}; +const deserializeAws_json1_1LayerPartTooSmallException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1LayersNotFoundException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1LifecyclePolicyNotFoundException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1LifecyclePolicyPreviewInProgressException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1LifecyclePolicyPreviewNotFoundException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1LifecyclePolicyPreviewResult = (output, context) => { + return { + action: output.action !== undefined && output.action !== null + ? deserializeAws_json1_1LifecyclePolicyRuleAction(output.action, context) + : undefined, + appliedRulePriority: smithy_client_1.expectInt32(output.appliedRulePriority), + imageDigest: smithy_client_1.expectString(output.imageDigest), + imagePushedAt: output.imagePushedAt !== undefined && output.imagePushedAt !== null + ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.imagePushedAt))) + : undefined, + imageTags: output.imageTags !== undefined && output.imageTags !== null + ? deserializeAws_json1_1ImageTagList(output.imageTags, context) + : undefined, + }; +}; +const deserializeAws_json1_1LifecyclePolicyPreviewResultList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1LifecyclePolicyPreviewResult(entry, context); + }); +}; +const deserializeAws_json1_1LifecyclePolicyPreviewSummary = (output, context) => { + return { + expiringImageTotalCount: smithy_client_1.expectInt32(output.expiringImageTotalCount), + }; +}; +const deserializeAws_json1_1LifecyclePolicyRuleAction = (output, context) => { + return { + type: smithy_client_1.expectString(output.type), + }; +}; +const deserializeAws_json1_1LimitExceededException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1ListImagesResponse = (output, context) => { + return { + imageIds: output.imageIds !== undefined && output.imageIds !== null + ? deserializeAws_json1_1ImageIdentifierList(output.imageIds, context) + : undefined, + nextToken: smithy_client_1.expectString(output.nextToken), + }; +}; +const deserializeAws_json1_1ListTagsForResourceResponse = (output, context) => { + return { + tags: output.tags !== undefined && output.tags !== null + ? deserializeAws_json1_1TagList(output.tags, context) + : undefined, + }; +}; +const deserializeAws_json1_1PackageVulnerabilityDetails = (output, context) => { + return { + cvss: output.cvss !== undefined && output.cvss !== null + ? deserializeAws_json1_1CvssScoreList(output.cvss, context) + : undefined, + referenceUrls: output.referenceUrls !== undefined && output.referenceUrls !== null + ? deserializeAws_json1_1ReferenceUrlsList(output.referenceUrls, context) + : undefined, + relatedVulnerabilities: output.relatedVulnerabilities !== undefined && output.relatedVulnerabilities !== null + ? deserializeAws_json1_1RelatedVulnerabilitiesList(output.relatedVulnerabilities, context) + : undefined, + source: smithy_client_1.expectString(output.source), + sourceUrl: smithy_client_1.expectString(output.sourceUrl), + vendorCreatedAt: output.vendorCreatedAt !== undefined && output.vendorCreatedAt !== null + ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.vendorCreatedAt))) + : undefined, + vendorSeverity: smithy_client_1.expectString(output.vendorSeverity), + vendorUpdatedAt: output.vendorUpdatedAt !== undefined && output.vendorUpdatedAt !== null + ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.vendorUpdatedAt))) + : undefined, + vulnerabilityId: smithy_client_1.expectString(output.vulnerabilityId), + vulnerablePackages: output.vulnerablePackages !== undefined && output.vulnerablePackages !== null + ? deserializeAws_json1_1VulnerablePackagesList(output.vulnerablePackages, context) + : undefined, + }; +}; +const deserializeAws_json1_1PullThroughCacheRule = (output, context) => { + return { + createdAt: output.createdAt !== undefined && output.createdAt !== null + ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.createdAt))) + : undefined, + ecrRepositoryPrefix: smithy_client_1.expectString(output.ecrRepositoryPrefix), + registryId: smithy_client_1.expectString(output.registryId), + upstreamRegistryUrl: smithy_client_1.expectString(output.upstreamRegistryUrl), + }; +}; +const deserializeAws_json1_1PullThroughCacheRuleAlreadyExistsException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1PullThroughCacheRuleList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1PullThroughCacheRule(entry, context); + }); +}; +const deserializeAws_json1_1PullThroughCacheRuleNotFoundException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1PutImageResponse = (output, context) => { + return { + image: output.image !== undefined && output.image !== null + ? deserializeAws_json1_1Image(output.image, context) + : undefined, + }; +}; +const deserializeAws_json1_1PutImageScanningConfigurationResponse = (output, context) => { + return { + imageScanningConfiguration: output.imageScanningConfiguration !== undefined && output.imageScanningConfiguration !== null + ? deserializeAws_json1_1ImageScanningConfiguration(output.imageScanningConfiguration, context) + : undefined, + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + }; +}; +const deserializeAws_json1_1PutImageTagMutabilityResponse = (output, context) => { + return { + imageTagMutability: smithy_client_1.expectString(output.imageTagMutability), + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + }; +}; +const deserializeAws_json1_1PutLifecyclePolicyResponse = (output, context) => { + return { + lifecyclePolicyText: smithy_client_1.expectString(output.lifecyclePolicyText), + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + }; +}; +const deserializeAws_json1_1PutRegistryPolicyResponse = (output, context) => { + return { + policyText: smithy_client_1.expectString(output.policyText), + registryId: smithy_client_1.expectString(output.registryId), + }; +}; +const deserializeAws_json1_1PutRegistryScanningConfigurationResponse = (output, context) => { + return { + registryScanningConfiguration: output.registryScanningConfiguration !== undefined && output.registryScanningConfiguration !== null + ? deserializeAws_json1_1RegistryScanningConfiguration(output.registryScanningConfiguration, context) + : undefined, + }; +}; +const deserializeAws_json1_1PutReplicationConfigurationResponse = (output, context) => { + return { + replicationConfiguration: output.replicationConfiguration !== undefined && output.replicationConfiguration !== null + ? deserializeAws_json1_1ReplicationConfiguration(output.replicationConfiguration, context) + : undefined, + }; +}; +const deserializeAws_json1_1Recommendation = (output, context) => { + return { + text: smithy_client_1.expectString(output.text), + url: smithy_client_1.expectString(output.url), + }; +}; +const deserializeAws_json1_1ReferencedImagesNotFoundException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1ReferenceUrlsList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return smithy_client_1.expectString(entry); + }); +}; +const deserializeAws_json1_1RegistryPolicyNotFoundException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1RegistryScanningConfiguration = (output, context) => { + return { + rules: output.rules !== undefined && output.rules !== null + ? deserializeAws_json1_1RegistryScanningRuleList(output.rules, context) + : undefined, + scanType: smithy_client_1.expectString(output.scanType), + }; +}; +const deserializeAws_json1_1RegistryScanningRule = (output, context) => { + return { + repositoryFilters: output.repositoryFilters !== undefined && output.repositoryFilters !== null + ? deserializeAws_json1_1ScanningRepositoryFilterList(output.repositoryFilters, context) + : undefined, + scanFrequency: smithy_client_1.expectString(output.scanFrequency), + }; +}; +const deserializeAws_json1_1RegistryScanningRuleList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1RegistryScanningRule(entry, context); + }); +}; +const deserializeAws_json1_1RelatedVulnerabilitiesList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return smithy_client_1.expectString(entry); + }); +}; +const deserializeAws_json1_1Remediation = (output, context) => { + return { + recommendation: output.recommendation !== undefined && output.recommendation !== null + ? deserializeAws_json1_1Recommendation(output.recommendation, context) + : undefined, + }; +}; +const deserializeAws_json1_1ReplicationConfiguration = (output, context) => { + return { + rules: output.rules !== undefined && output.rules !== null + ? deserializeAws_json1_1ReplicationRuleList(output.rules, context) + : undefined, + }; +}; +const deserializeAws_json1_1ReplicationDestination = (output, context) => { + return { + region: smithy_client_1.expectString(output.region), + registryId: smithy_client_1.expectString(output.registryId), + }; +}; +const deserializeAws_json1_1ReplicationDestinationList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1ReplicationDestination(entry, context); + }); +}; +const deserializeAws_json1_1ReplicationRule = (output, context) => { + return { + destinations: output.destinations !== undefined && output.destinations !== null + ? deserializeAws_json1_1ReplicationDestinationList(output.destinations, context) + : undefined, + repositoryFilters: output.repositoryFilters !== undefined && output.repositoryFilters !== null + ? deserializeAws_json1_1RepositoryFilterList(output.repositoryFilters, context) + : undefined, + }; +}; +const deserializeAws_json1_1ReplicationRuleList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1ReplicationRule(entry, context); + }); +}; +const deserializeAws_json1_1Repository = (output, context) => { + return { + createdAt: output.createdAt !== undefined && output.createdAt !== null + ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.createdAt))) + : undefined, + encryptionConfiguration: output.encryptionConfiguration !== undefined && output.encryptionConfiguration !== null + ? deserializeAws_json1_1EncryptionConfiguration(output.encryptionConfiguration, context) + : undefined, + imageScanningConfiguration: output.imageScanningConfiguration !== undefined && output.imageScanningConfiguration !== null + ? deserializeAws_json1_1ImageScanningConfiguration(output.imageScanningConfiguration, context) + : undefined, + imageTagMutability: smithy_client_1.expectString(output.imageTagMutability), + registryId: smithy_client_1.expectString(output.registryId), + repositoryArn: smithy_client_1.expectString(output.repositoryArn), + repositoryName: smithy_client_1.expectString(output.repositoryName), + repositoryUri: smithy_client_1.expectString(output.repositoryUri), + }; +}; +const deserializeAws_json1_1RepositoryAlreadyExistsException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1RepositoryFilter = (output, context) => { + return { + filter: smithy_client_1.expectString(output.filter), + filterType: smithy_client_1.expectString(output.filterType), + }; +}; +const deserializeAws_json1_1RepositoryFilterList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1RepositoryFilter(entry, context); + }); +}; +const deserializeAws_json1_1RepositoryList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1Repository(entry, context); + }); +}; +const deserializeAws_json1_1RepositoryNotEmptyException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1RepositoryNotFoundException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1RepositoryPolicyNotFoundException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1RepositoryScanningConfiguration = (output, context) => { + return { + appliedScanFilters: output.appliedScanFilters !== undefined && output.appliedScanFilters !== null + ? deserializeAws_json1_1ScanningRepositoryFilterList(output.appliedScanFilters, context) + : undefined, + repositoryArn: smithy_client_1.expectString(output.repositoryArn), + repositoryName: smithy_client_1.expectString(output.repositoryName), + scanFrequency: smithy_client_1.expectString(output.scanFrequency), + scanOnPush: smithy_client_1.expectBoolean(output.scanOnPush), + }; +}; +const deserializeAws_json1_1RepositoryScanningConfigurationFailure = (output, context) => { + return { + failureCode: smithy_client_1.expectString(output.failureCode), + failureReason: smithy_client_1.expectString(output.failureReason), + repositoryName: smithy_client_1.expectString(output.repositoryName), + }; +}; +const deserializeAws_json1_1RepositoryScanningConfigurationFailureList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1RepositoryScanningConfigurationFailure(entry, context); + }); +}; +const deserializeAws_json1_1RepositoryScanningConfigurationList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1RepositoryScanningConfiguration(entry, context); + }); +}; +const deserializeAws_json1_1Resource = (output, context) => { + return { + details: output.details !== undefined && output.details !== null + ? deserializeAws_json1_1ResourceDetails(output.details, context) + : undefined, + id: smithy_client_1.expectString(output.id), + tags: output.tags !== undefined && output.tags !== null ? deserializeAws_json1_1Tags(output.tags, context) : undefined, + type: smithy_client_1.expectString(output.type), + }; +}; +const deserializeAws_json1_1ResourceDetails = (output, context) => { + return { + awsEcrContainerImage: output.awsEcrContainerImage !== undefined && output.awsEcrContainerImage !== null + ? deserializeAws_json1_1AwsEcrContainerImageDetails(output.awsEcrContainerImage, context) + : undefined, + }; +}; +const deserializeAws_json1_1ResourceList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1Resource(entry, context); + }); +}; +const deserializeAws_json1_1ScanningRepositoryFilter = (output, context) => { + return { + filter: smithy_client_1.expectString(output.filter), + filterType: smithy_client_1.expectString(output.filterType), + }; +}; +const deserializeAws_json1_1ScanningRepositoryFilterList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1ScanningRepositoryFilter(entry, context); + }); +}; +const deserializeAws_json1_1ScanNotFoundException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1ScoreDetails = (output, context) => { + return { + cvss: output.cvss !== undefined && output.cvss !== null + ? deserializeAws_json1_1CvssScoreDetails(output.cvss, context) + : undefined, + }; +}; +const deserializeAws_json1_1ServerException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1SetRepositoryPolicyResponse = (output, context) => { + return { + policyText: smithy_client_1.expectString(output.policyText), + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + }; +}; +const deserializeAws_json1_1StartImageScanResponse = (output, context) => { + return { + imageId: output.imageId !== undefined && output.imageId !== null + ? deserializeAws_json1_1ImageIdentifier(output.imageId, context) + : undefined, + imageScanStatus: output.imageScanStatus !== undefined && output.imageScanStatus !== null + ? deserializeAws_json1_1ImageScanStatus(output.imageScanStatus, context) + : undefined, + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + }; +}; +const deserializeAws_json1_1StartLifecyclePolicyPreviewResponse = (output, context) => { + return { + lifecyclePolicyText: smithy_client_1.expectString(output.lifecyclePolicyText), + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + status: smithy_client_1.expectString(output.status), + }; +}; +const deserializeAws_json1_1Tag = (output, context) => { + return { + Key: smithy_client_1.expectString(output.Key), + Value: smithy_client_1.expectString(output.Value), + }; +}; +const deserializeAws_json1_1TagList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1Tag(entry, context); + }); +}; +const deserializeAws_json1_1TagResourceResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1Tags = (output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: smithy_client_1.expectString(value), + }; + }, {}); +}; +const deserializeAws_json1_1TooManyTagsException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1UnsupportedImageTypeException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1UnsupportedUpstreamRegistryException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1UntagResourceResponse = (output, context) => { + return {}; +}; +const deserializeAws_json1_1UploadLayerPartResponse = (output, context) => { + return { + lastByteReceived: smithy_client_1.expectLong(output.lastByteReceived), + registryId: smithy_client_1.expectString(output.registryId), + repositoryName: smithy_client_1.expectString(output.repositoryName), + uploadId: smithy_client_1.expectString(output.uploadId), + }; +}; +const deserializeAws_json1_1UploadNotFoundException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1ValidationException = (output, context) => { + return { + message: smithy_client_1.expectString(output.message), + }; +}; +const deserializeAws_json1_1VulnerablePackage = (output, context) => { + return { + arch: smithy_client_1.expectString(output.arch), + epoch: smithy_client_1.expectInt32(output.epoch), + filePath: smithy_client_1.expectString(output.filePath), + name: smithy_client_1.expectString(output.name), + packageManager: smithy_client_1.expectString(output.packageManager), + release: smithy_client_1.expectString(output.release), + sourceLayerHash: smithy_client_1.expectString(output.sourceLayerHash), + version: smithy_client_1.expectString(output.version), + }; +}; +const deserializeAws_json1_1VulnerablePackagesList = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_json1_1VulnerablePackage(entry, context); + }); +}; +const deserializeMetadata = (output) => { + var _a; + return ({ + httpStatusCode: output.statusCode, + requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], + }); +}; +const collectBody = (streamBody = new Uint8Array(), context) => { + if (streamBody instanceof Uint8Array) { + return Promise.resolve(streamBody); + } + return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); +}; +const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const buildHttpRpcRequest = 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 !== undefined) { + contents.hostname = resolvedHostname; + } + if (body !== undefined) { + contents.body = body; + } + return new protocol_http_1.HttpRequest(contents); +}; +const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + return JSON.parse(encoded); + } + return {}; +}); +const loadRestJsonErrorCode = (output, data) => { + const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); + const sanitizeErrorCode = (rawValue) => { + let cleanValue = rawValue; + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + const headerKey = findKey(output.headers, "x-amzn-errortype"); + if (headerKey !== undefined) { + return sanitizeErrorCode(output.headers[headerKey]); + } + if (data.code !== undefined) { + return sanitizeErrorCode(data.code); + } + if (data["__type"] !== undefined) { + return sanitizeErrorCode(data["__type"]); + } + return ""; +}; + + +/***/ }), + +/***/ 869: +/***/ ((__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__(6879)); +const client_sts_1 = __nccwpck_require__(2209); +const config_resolver_1 = __nccwpck_require__(6153); +const credential_provider_node_1 = __nccwpck_require__(5531); +const hash_node_1 = __nccwpck_require__(7442); +const middleware_retry_1 = __nccwpck_require__(6064); +const node_config_provider_1 = __nccwpck_require__(7684); +const node_http_handler_1 = __nccwpck_require__(8805); +const util_base64_node_1 = __nccwpck_require__(8588); +const util_body_length_node_1 = __nccwpck_require__(4147); +const util_user_agent_node_1 = __nccwpck_require__(8095); +const util_utf8_node_1 = __nccwpck_require__(6278); +const runtimeConfig_shared_1 = __nccwpck_require__(542); +const smithy_client_1 = __nccwpck_require__(4963); +const getRuntimeConfig = (config) => { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q; + smithy_client_1.emitWarningIfUnsupportedVersion(process.version); + const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "node", + base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64, + base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64, + bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : client_sts_1.decorateDefaultCredentialProvider(credential_provider_node_1.defaultProvider), + defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : util_user_agent_node_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(), + retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig(middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS), + sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, "sha256"), + streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector, + useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), + utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : util_utf8_node_1.fromUtf8, + utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : util_utf8_node_1.toUtf8, + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; + + +/***/ }), + +/***/ 542: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRuntimeConfig = void 0; +const url_parser_1 = __nccwpck_require__(2992); +const endpoints_1 = __nccwpck_require__(3070); +const getRuntimeConfig = (config) => { + var _a, _b, _c, _d, _e; + return ({ + apiVersion: "2015-09-21", + disableHostPrefix: (_a = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _a !== void 0 ? _a : false, + logger: (_b = config === null || config === void 0 ? void 0 : config.logger) !== null && _b !== void 0 ? _b : {}, + regionInfoProvider: (_c = config === null || config === void 0 ? void 0 : config.regionInfoProvider) !== null && _c !== void 0 ? _c : endpoints_1.defaultRegionInfoProvider, + serviceId: (_d = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _d !== void 0 ? _d : "ECR", + urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : url_parser_1.parseUrl, + }); +}; +exports.getRuntimeConfig = getRuntimeConfig; + + +/***/ }), + +/***/ 8406: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(8547), exports); +tslib_1.__exportStar(__nccwpck_require__(5723), exports); + + +/***/ }), + +/***/ 8547: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.waitUntilImageScanComplete = exports.waitForImageScanComplete = void 0; +const util_waiter_1 = __nccwpck_require__(1627); +const DescribeImageScanFindingsCommand_1 = __nccwpck_require__(2987); +const checkState = async (client, input) => { + let reason; + try { + const result = await client.send(new DescribeImageScanFindingsCommand_1.DescribeImageScanFindingsCommand(input)); + reason = result; + try { + const returnComparator = () => { + return result.imageScanStatus.status; + }; + if (returnComparator() === "COMPLETE") { + return { state: util_waiter_1.WaiterState.SUCCESS, reason }; + } + } + catch (e) { } + try { + const returnComparator = () => { + return result.imageScanStatus.status; + }; + if (returnComparator() === "FAILED") { + return { state: util_waiter_1.WaiterState.FAILURE, reason }; + } + } + catch (e) { } + } + catch (exception) { + reason = exception; + } + return { state: util_waiter_1.WaiterState.RETRY, reason }; +}; +const waitForImageScanComplete = async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + return util_waiter_1.createWaiter({ ...serviceDefaults, ...params }, input, checkState); +}; +exports.waitForImageScanComplete = waitForImageScanComplete; +const waitUntilImageScanComplete = async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + const result = await util_waiter_1.createWaiter({ ...serviceDefaults, ...params }, input, checkState); + return util_waiter_1.checkExceptions(result); +}; +exports.waitUntilImageScanComplete = waitUntilImageScanComplete; + + +/***/ }), + +/***/ 5723: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.waitUntilLifecyclePolicyPreviewComplete = exports.waitForLifecyclePolicyPreviewComplete = void 0; +const util_waiter_1 = __nccwpck_require__(1627); +const GetLifecyclePolicyPreviewCommand_1 = __nccwpck_require__(7006); +const checkState = async (client, input) => { + let reason; + try { + const result = await client.send(new GetLifecyclePolicyPreviewCommand_1.GetLifecyclePolicyPreviewCommand(input)); + reason = result; + try { + const returnComparator = () => { + return result.status; + }; + if (returnComparator() === "COMPLETE") { + return { state: util_waiter_1.WaiterState.SUCCESS, reason }; + } + } + catch (e) { } + try { + const returnComparator = () => { + return result.status; + }; + if (returnComparator() === "FAILED") { + return { state: util_waiter_1.WaiterState.FAILURE, reason }; + } + } + catch (e) { } + } + catch (exception) { + reason = exception; + } + return { state: util_waiter_1.WaiterState.RETRY, reason }; +}; +const waitForLifecyclePolicyPreviewComplete = async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + return util_waiter_1.createWaiter({ ...serviceDefaults, ...params }, input, checkState); +}; +exports.waitForLifecyclePolicyPreviewComplete = waitForLifecyclePolicyPreviewComplete; +const waitUntilLifecyclePolicyPreviewComplete = async (params, input) => { + const serviceDefaults = { minDelay: 5, maxDelay: 120 }; + const result = await util_waiter_1.createWaiter({ ...serviceDefaults, ...params }, input, checkState); + return util_waiter_1.checkExceptions(result); +}; +exports.waitUntilLifecyclePolicyPreviewComplete = waitUntilLifecyclePolicyPreviewComplete; + + +/***/ }), + +/***/ 9838: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SSO = void 0; +const GetRoleCredentialsCommand_1 = __nccwpck_require__(8972); +const ListAccountRolesCommand_1 = __nccwpck_require__(1513); +const ListAccountsCommand_1 = __nccwpck_require__(4296); +const LogoutCommand_1 = __nccwpck_require__(2586); +const SSOClient_1 = __nccwpck_require__(1057); +class SSO extends SSOClient_1.SSOClient { + getRoleCredentials(args, optionsOrCb, cb) { + const command = new GetRoleCredentialsCommand_1.GetRoleCredentialsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + listAccountRoles(args, optionsOrCb, cb) { + const command = new ListAccountRolesCommand_1.ListAccountRolesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + listAccounts(args, optionsOrCb, cb) { + const command = new ListAccountsCommand_1.ListAccountsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + logout(args, optionsOrCb, cb) { + const command = new LogoutCommand_1.LogoutCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } +} +exports.SSO = SSO; + + +/***/ }), + +/***/ 1057: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SSOClient = void 0; +const config_resolver_1 = __nccwpck_require__(6153); +const middleware_content_length_1 = __nccwpck_require__(2245); +const middleware_host_header_1 = __nccwpck_require__(2545); +const middleware_logger_1 = __nccwpck_require__(14); +const middleware_retry_1 = __nccwpck_require__(6064); +const middleware_user_agent_1 = __nccwpck_require__(4688); +const smithy_client_1 = __nccwpck_require__(4963); +const runtimeConfig_1 = __nccwpck_require__(9756); +class SSOClient extends smithy_client_1.Client { + constructor(configuration) { + const _config_0 = runtimeConfig_1.getRuntimeConfig(configuration); + const _config_1 = config_resolver_1.resolveRegionConfig(_config_0); + const _config_2 = config_resolver_1.resolveEndpointsConfig(_config_1); + const _config_3 = middleware_retry_1.resolveRetryConfig(_config_2); + const _config_4 = middleware_host_header_1.resolveHostHeaderConfig(_config_3); + const _config_5 = middleware_user_agent_1.resolveUserAgentConfig(_config_4); + super(_config_5); + this.config = _config_5; + this.middlewareStack.use(middleware_retry_1.getRetryPlugin(this.config)); + this.middlewareStack.use(middleware_content_length_1.getContentLengthPlugin(this.config)); + this.middlewareStack.use(middleware_host_header_1.getHostHeaderPlugin(this.config)); + this.middlewareStack.use(middleware_logger_1.getLoggerPlugin(this.config)); + this.middlewareStack.use(middleware_user_agent_1.getUserAgentPlugin(this.config)); + } + destroy() { + super.destroy(); + } +} +exports.SSOClient = SSOClient; + + +/***/ }), + +/***/ 8972: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetRoleCredentialsCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(6390); +const Aws_restJson1_1 = __nccwpck_require__(8507); +class GetRoleCredentialsCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SSOClient"; + const commandName = "GetRoleCredentialsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetRoleCredentialsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetRoleCredentialsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1GetRoleCredentialsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1GetRoleCredentialsCommand(output, context); + } +} +exports.GetRoleCredentialsCommand = GetRoleCredentialsCommand; + + +/***/ }), + +/***/ 1513: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListAccountRolesCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(6390); +const Aws_restJson1_1 = __nccwpck_require__(8507); +class ListAccountRolesCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SSOClient"; + const commandName = "ListAccountRolesCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListAccountRolesRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListAccountRolesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListAccountRolesCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListAccountRolesCommand(output, context); + } +} +exports.ListAccountRolesCommand = ListAccountRolesCommand; + + +/***/ }), + +/***/ 4296: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListAccountsCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(6390); +const Aws_restJson1_1 = __nccwpck_require__(8507); +class ListAccountsCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SSOClient"; + const commandName = "ListAccountsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.ListAccountsRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.ListAccountsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1ListAccountsCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1ListAccountsCommand(output, context); + } +} +exports.ListAccountsCommand = ListAccountsCommand; + + +/***/ }), + +/***/ 2586: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.LogoutCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(6390); +const Aws_restJson1_1 = __nccwpck_require__(8507); +class LogoutCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SSOClient"; + const commandName = "LogoutCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.LogoutRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output) => output, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_restJson1_1.serializeAws_restJson1LogoutCommand(input, context); + } + deserialize(output, context) { + return Aws_restJson1_1.deserializeAws_restJson1LogoutCommand(output, context); + } +} +exports.LogoutCommand = LogoutCommand; + + +/***/ }), + +/***/ 5706: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(8972), exports); +tslib_1.__exportStar(__nccwpck_require__(1513), exports); +tslib_1.__exportStar(__nccwpck_require__(4296), exports); +tslib_1.__exportStar(__nccwpck_require__(2586), exports); + + +/***/ }), + +/***/ 3546: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultRegionInfoProvider = void 0; +const config_resolver_1 = __nccwpck_require__(6153); +const regionHash = { + "ap-northeast-1": { + variants: [ + { + hostname: "portal.sso.ap-northeast-1.amazonaws.com", + tags: [], + }, + ], + signingRegion: "ap-northeast-1", + }, + "ap-northeast-2": { + variants: [ + { + hostname: "portal.sso.ap-northeast-2.amazonaws.com", + tags: [], + }, + ], + signingRegion: "ap-northeast-2", + }, + "ap-south-1": { + variants: [ + { + hostname: "portal.sso.ap-south-1.amazonaws.com", + tags: [], + }, + ], + signingRegion: "ap-south-1", + }, + "ap-southeast-1": { + variants: [ + { + hostname: "portal.sso.ap-southeast-1.amazonaws.com", + tags: [], + }, + ], + signingRegion: "ap-southeast-1", + }, + "ap-southeast-2": { + variants: [ + { + hostname: "portal.sso.ap-southeast-2.amazonaws.com", + tags: [], + }, + ], + signingRegion: "ap-southeast-2", + }, + "ca-central-1": { + variants: [ + { + hostname: "portal.sso.ca-central-1.amazonaws.com", + tags: [], + }, + ], + signingRegion: "ca-central-1", + }, + "eu-central-1": { + variants: [ + { + hostname: "portal.sso.eu-central-1.amazonaws.com", + tags: [], + }, + ], + signingRegion: "eu-central-1", + }, + "eu-north-1": { + variants: [ + { + hostname: "portal.sso.eu-north-1.amazonaws.com", + tags: [], + }, + ], + signingRegion: "eu-north-1", + }, + "eu-west-1": { + variants: [ + { + hostname: "portal.sso.eu-west-1.amazonaws.com", + tags: [], + }, + ], + signingRegion: "eu-west-1", + }, + "eu-west-2": { + variants: [ + { + hostname: "portal.sso.eu-west-2.amazonaws.com", + tags: [], + }, + ], + signingRegion: "eu-west-2", + }, + "eu-west-3": { + variants: [ + { + hostname: "portal.sso.eu-west-3.amazonaws.com", + tags: [], + }, + ], + signingRegion: "eu-west-3", + }, + "sa-east-1": { + variants: [ + { + hostname: "portal.sso.sa-east-1.amazonaws.com", + tags: [], + }, + ], + signingRegion: "sa-east-1", + }, + "us-east-1": { + variants: [ + { + hostname: "portal.sso.us-east-1.amazonaws.com", + tags: [], + }, + ], + signingRegion: "us-east-1", + }, + "us-east-2": { + variants: [ + { + hostname: "portal.sso.us-east-2.amazonaws.com", + tags: [], + }, + ], + signingRegion: "us-east-2", + }, + "us-gov-west-1": { + variants: [ + { + hostname: "portal.sso.us-gov-west-1.amazonaws.com", + tags: [], + }, + ], + signingRegion: "us-gov-west-1", + }, + "us-west-2": { + variants: [ + { + hostname: "portal.sso.us-west-2.amazonaws.com", + tags: [], + }, + ], + signingRegion: "us-west-2", + }, +}; +const partitionHash = { + aws: { + regions: [ + "af-south-1", + "ap-east-1", + "ap-northeast-1", + "ap-northeast-2", + "ap-northeast-3", + "ap-south-1", + "ap-southeast-1", + "ap-southeast-2", + "ca-central-1", + "eu-central-1", + "eu-north-1", + "eu-south-1", + "eu-west-1", + "eu-west-2", + "eu-west-3", + "me-south-1", + "sa-east-1", + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2", + ], + regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "portal.sso.{region}.amazonaws.com", + tags: [], + }, + { + hostname: "portal.sso-fips.{region}.amazonaws.com", + tags: ["fips"], + }, + { + hostname: "portal.sso-fips.{region}.api.aws", + tags: ["dualstack", "fips"], + }, + { + hostname: "portal.sso.{region}.api.aws", + tags: ["dualstack"], + }, + ], + }, + "aws-cn": { + regions: ["cn-north-1", "cn-northwest-1"], + regionRegex: "^cn\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "portal.sso.{region}.amazonaws.com.cn", + tags: [], + }, + { + hostname: "portal.sso-fips.{region}.amazonaws.com.cn", + tags: ["fips"], + }, + { + hostname: "portal.sso-fips.{region}.api.amazonwebservices.com.cn", + tags: ["dualstack", "fips"], + }, + { + hostname: "portal.sso.{region}.api.amazonwebservices.com.cn", + tags: ["dualstack"], + }, + ], + }, + "aws-iso": { + regions: ["us-iso-east-1", "us-iso-west-1"], + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "portal.sso.{region}.c2s.ic.gov", + tags: [], + }, + { + hostname: "portal.sso-fips.{region}.c2s.ic.gov", + tags: ["fips"], + }, + ], + }, + "aws-iso-b": { + regions: ["us-isob-east-1"], + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "portal.sso.{region}.sc2s.sgov.gov", + tags: [], + }, + { + hostname: "portal.sso-fips.{region}.sc2s.sgov.gov", + tags: ["fips"], + }, + ], + }, + "aws-us-gov": { + regions: ["us-gov-east-1", "us-gov-west-1"], + regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "portal.sso.{region}.amazonaws.com", + tags: [], + }, + { + hostname: "portal.sso-fips.{region}.amazonaws.com", + tags: ["fips"], + }, + { + hostname: "portal.sso-fips.{region}.api.aws", + tags: ["dualstack", "fips"], + }, + { + hostname: "portal.sso.{region}.api.aws", + tags: ["dualstack"], + }, + ], + }, +}; +const defaultRegionInfoProvider = async (region, options) => config_resolver_1.getRegionInfo(region, { + ...options, + signingService: "awsssoportal", + regionHash, + partitionHash, +}); +exports.defaultRegionInfoProvider = defaultRegionInfoProvider; + + +/***/ }), + +/***/ 2666: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(9838), exports); +tslib_1.__exportStar(__nccwpck_require__(1057), exports); +tslib_1.__exportStar(__nccwpck_require__(5706), exports); +tslib_1.__exportStar(__nccwpck_require__(4952), exports); +tslib_1.__exportStar(__nccwpck_require__(6773), exports); + + +/***/ }), + +/***/ 4952: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(6390), exports); + + +/***/ }), + +/***/ 6390: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.LogoutRequest = exports.ListAccountsResponse = exports.ListAccountsRequest = exports.ListAccountRolesResponse = exports.RoleInfo = exports.ListAccountRolesRequest = exports.UnauthorizedException = exports.TooManyRequestsException = exports.ResourceNotFoundException = exports.InvalidRequestException = exports.GetRoleCredentialsResponse = exports.RoleCredentials = exports.GetRoleCredentialsRequest = exports.AccountInfo = void 0; +const smithy_client_1 = __nccwpck_require__(4963); +var AccountInfo; +(function (AccountInfo) { + AccountInfo.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AccountInfo = exports.AccountInfo || (exports.AccountInfo = {})); +var GetRoleCredentialsRequest; +(function (GetRoleCredentialsRequest) { + GetRoleCredentialsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }), + }); +})(GetRoleCredentialsRequest = exports.GetRoleCredentialsRequest || (exports.GetRoleCredentialsRequest = {})); +var RoleCredentials; +(function (RoleCredentials) { + RoleCredentials.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.secretAccessKey && { secretAccessKey: smithy_client_1.SENSITIVE_STRING }), + ...(obj.sessionToken && { sessionToken: smithy_client_1.SENSITIVE_STRING }), + }); +})(RoleCredentials = exports.RoleCredentials || (exports.RoleCredentials = {})); +var GetRoleCredentialsResponse; +(function (GetRoleCredentialsResponse) { + GetRoleCredentialsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.roleCredentials && { roleCredentials: RoleCredentials.filterSensitiveLog(obj.roleCredentials) }), + }); +})(GetRoleCredentialsResponse = exports.GetRoleCredentialsResponse || (exports.GetRoleCredentialsResponse = {})); +var InvalidRequestException; +(function (InvalidRequestException) { + InvalidRequestException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidRequestException = exports.InvalidRequestException || (exports.InvalidRequestException = {})); +var ResourceNotFoundException; +(function (ResourceNotFoundException) { + ResourceNotFoundException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ResourceNotFoundException = exports.ResourceNotFoundException || (exports.ResourceNotFoundException = {})); +var TooManyRequestsException; +(function (TooManyRequestsException) { + TooManyRequestsException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(TooManyRequestsException = exports.TooManyRequestsException || (exports.TooManyRequestsException = {})); +var UnauthorizedException; +(function (UnauthorizedException) { + UnauthorizedException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(UnauthorizedException = exports.UnauthorizedException || (exports.UnauthorizedException = {})); +var ListAccountRolesRequest; +(function (ListAccountRolesRequest) { + ListAccountRolesRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }), + }); +})(ListAccountRolesRequest = exports.ListAccountRolesRequest || (exports.ListAccountRolesRequest = {})); +var RoleInfo; +(function (RoleInfo) { + RoleInfo.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RoleInfo = exports.RoleInfo || (exports.RoleInfo = {})); +var ListAccountRolesResponse; +(function (ListAccountRolesResponse) { + ListAccountRolesResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListAccountRolesResponse = exports.ListAccountRolesResponse || (exports.ListAccountRolesResponse = {})); +var ListAccountsRequest; +(function (ListAccountsRequest) { + ListAccountsRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }), + }); +})(ListAccountsRequest = exports.ListAccountsRequest || (exports.ListAccountsRequest = {})); +var ListAccountsResponse; +(function (ListAccountsResponse) { + ListAccountsResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ListAccountsResponse = exports.ListAccountsResponse || (exports.ListAccountsResponse = {})); +var LogoutRequest; +(function (LogoutRequest) { + LogoutRequest.filterSensitiveLog = (obj) => ({ + ...obj, + ...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }), + }); +})(LogoutRequest = exports.LogoutRequest || (exports.LogoutRequest = {})); + + +/***/ }), + +/***/ 849: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); + + +/***/ }), + +/***/ 8460: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListAccountRoles = void 0; +const ListAccountRolesCommand_1 = __nccwpck_require__(1513); +const SSO_1 = __nccwpck_require__(9838); +const SSOClient_1 = __nccwpck_require__(1057); +const makePagedClientRequest = async (client, input, ...args) => { + return await client.send(new ListAccountRolesCommand_1.ListAccountRolesCommand(input), ...args); +}; +const makePagedRequest = async (client, input, ...args) => { + return await client.listAccountRoles(input, ...args); +}; +async function* paginateListAccountRoles(config, input, ...additionalArguments) { + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof SSO_1.SSO) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof SSOClient_1.SSOClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected SSO | SSOClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + return undefined; +} +exports.paginateListAccountRoles = paginateListAccountRoles; + + +/***/ }), + +/***/ 938: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListAccounts = void 0; +const ListAccountsCommand_1 = __nccwpck_require__(4296); +const SSO_1 = __nccwpck_require__(9838); +const SSOClient_1 = __nccwpck_require__(1057); +const makePagedClientRequest = async (client, input, ...args) => { + return await client.send(new ListAccountsCommand_1.ListAccountsCommand(input), ...args); +}; +const makePagedRequest = async (client, input, ...args) => { + return await client.listAccounts(input, ...args); +}; +async function* paginateListAccounts(config, input, ...additionalArguments) { + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof SSO_1.SSO) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } + else if (config.client instanceof SSOClient_1.SSOClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } + else { + throw new Error("Invalid client, expected SSO | SSOClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + return undefined; +} +exports.paginateListAccounts = paginateListAccounts; + + +/***/ }), + +/***/ 6773: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(849), exports); +tslib_1.__exportStar(__nccwpck_require__(8460), exports); +tslib_1.__exportStar(__nccwpck_require__(938), exports); + + +/***/ }), + +/***/ 8507: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.deserializeAws_restJson1LogoutCommand = exports.deserializeAws_restJson1ListAccountsCommand = exports.deserializeAws_restJson1ListAccountRolesCommand = exports.deserializeAws_restJson1GetRoleCredentialsCommand = exports.serializeAws_restJson1LogoutCommand = exports.serializeAws_restJson1ListAccountsCommand = exports.serializeAws_restJson1ListAccountRolesCommand = exports.serializeAws_restJson1GetRoleCredentialsCommand = void 0; +const protocol_http_1 = __nccwpck_require__(223); +const smithy_client_1 = __nccwpck_require__(4963); +const serializeAws_restJson1GetRoleCredentialsCommand = async (input, context) => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers = { + ...(isSerializableHeaderValue(input.accessToken) && { "x-amz-sso_bearer_token": input.accessToken }), + }; + const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/federation/credentials"; + const query = { + ...(input.roleName !== undefined && { role_name: input.roleName }), + ...(input.accountId !== undefined && { account_id: input.accountId }), + }; + let body; + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1GetRoleCredentialsCommand = serializeAws_restJson1GetRoleCredentialsCommand; +const serializeAws_restJson1ListAccountRolesCommand = async (input, context) => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers = { + ...(isSerializableHeaderValue(input.accessToken) && { "x-amz-sso_bearer_token": input.accessToken }), + }; + const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/assignment/roles"; + const query = { + ...(input.nextToken !== undefined && { next_token: input.nextToken }), + ...(input.maxResults !== undefined && { max_result: input.maxResults.toString() }), + ...(input.accountId !== undefined && { account_id: input.accountId }), + }; + let body; + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListAccountRolesCommand = serializeAws_restJson1ListAccountRolesCommand; +const serializeAws_restJson1ListAccountsCommand = async (input, context) => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers = { + ...(isSerializableHeaderValue(input.accessToken) && { "x-amz-sso_bearer_token": input.accessToken }), + }; + const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/assignment/accounts"; + const query = { + ...(input.nextToken !== undefined && { next_token: input.nextToken }), + ...(input.maxResults !== undefined && { max_result: input.maxResults.toString() }), + }; + let body; + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; +exports.serializeAws_restJson1ListAccountsCommand = serializeAws_restJson1ListAccountsCommand; +const serializeAws_restJson1LogoutCommand = async (input, context) => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers = { + ...(isSerializableHeaderValue(input.accessToken) && { "x-amz-sso_bearer_token": input.accessToken }), + }; + const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/logout"; + let body; + return new protocol_http_1.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +exports.serializeAws_restJson1LogoutCommand = serializeAws_restJson1LogoutCommand; +const deserializeAws_restJson1GetRoleCredentialsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetRoleCredentialsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + roleCredentials: undefined, + }; + const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body"); + if (data.roleCredentials !== undefined && data.roleCredentials !== null) { + contents.roleCredentials = deserializeAws_restJson1RoleCredentials(data.roleCredentials, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1GetRoleCredentialsCommand = deserializeAws_restJson1GetRoleCredentialsCommand; +const deserializeAws_restJson1GetRoleCredentialsCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidRequestException": + case "com.amazonaws.sso#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.sso#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.sso#TooManyRequestsException": + response = { + ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.sso#UnauthorizedException": + response = { + ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_restJson1ListAccountRolesCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListAccountRolesCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + roleList: undefined, + }; + const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body"); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = smithy_client_1.expectString(data.nextToken); + } + if (data.roleList !== undefined && data.roleList !== null) { + contents.roleList = deserializeAws_restJson1RoleListType(data.roleList, context); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListAccountRolesCommand = deserializeAws_restJson1ListAccountRolesCommand; +const deserializeAws_restJson1ListAccountRolesCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidRequestException": + case "com.amazonaws.sso#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.sso#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.sso#TooManyRequestsException": + response = { + ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.sso#UnauthorizedException": + response = { + ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_restJson1ListAccountsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListAccountsCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + accountList: undefined, + nextToken: undefined, + }; + const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body"); + if (data.accountList !== undefined && data.accountList !== null) { + contents.accountList = deserializeAws_restJson1AccountListType(data.accountList, context); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = smithy_client_1.expectString(data.nextToken); + } + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1ListAccountsCommand = deserializeAws_restJson1ListAccountsCommand; +const deserializeAws_restJson1ListAccountsCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidRequestException": + case "com.amazonaws.sso#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.sso#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.sso#TooManyRequestsException": + response = { + ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.sso#UnauthorizedException": + response = { + ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_restJson1LogoutCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1LogoutCommandError(output, context); + } + const contents = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; +exports.deserializeAws_restJson1LogoutCommand = deserializeAws_restJson1LogoutCommand; +const deserializeAws_restJson1LogoutCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidRequestException": + case "com.amazonaws.sso#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.sso#TooManyRequestsException": + response = { + ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.sso#UnauthorizedException": + response = { + ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "InvalidRequestException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = smithy_client_1.expectString(data.message); + } + return contents; +}; +const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "ResourceNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = smithy_client_1.expectString(data.message); + } + return contents; +}; +const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "TooManyRequestsException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = smithy_client_1.expectString(data.message); + } + return contents; +}; +const deserializeAws_restJson1UnauthorizedExceptionResponse = async (parsedOutput, context) => { + const contents = { + name: "UnauthorizedException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = smithy_client_1.expectString(data.message); + } + return contents; +}; +const deserializeAws_restJson1AccountInfo = (output, context) => { + return { + accountId: smithy_client_1.expectString(output.accountId), + accountName: smithy_client_1.expectString(output.accountName), + emailAddress: smithy_client_1.expectString(output.emailAddress), + }; +}; +const deserializeAws_restJson1AccountListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1AccountInfo(entry, context); + }); +}; +const deserializeAws_restJson1RoleCredentials = (output, context) => { + return { + accessKeyId: smithy_client_1.expectString(output.accessKeyId), + expiration: smithy_client_1.expectLong(output.expiration), + secretAccessKey: smithy_client_1.expectString(output.secretAccessKey), + sessionToken: smithy_client_1.expectString(output.sessionToken), + }; +}; +const deserializeAws_restJson1RoleInfo = (output, context) => { + return { + accountId: smithy_client_1.expectString(output.accountId), + roleName: smithy_client_1.expectString(output.roleName), + }; +}; +const deserializeAws_restJson1RoleListType = (output, context) => { + return (output || []) + .filter((e) => e != null) + .map((entry) => { + if (entry === null) { + return null; + } + return deserializeAws_restJson1RoleInfo(entry, context); + }); +}; +const deserializeMetadata = (output) => { + var _a; + return ({ + httpStatusCode: output.statusCode, + requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], + }); +}; +const collectBody = (streamBody = new Uint8Array(), context) => { + if (streamBody instanceof Uint8Array) { + return Promise.resolve(streamBody); + } + return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); +}; +const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const isSerializableHeaderValue = (value) => value !== undefined && + value !== null && + value !== "" && + (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && + (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0); +const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + return JSON.parse(encoded); + } + return {}; +}); +const loadRestJsonErrorCode = (output, data) => { + const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); + const sanitizeErrorCode = (rawValue) => { + let cleanValue = rawValue; + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + const headerKey = findKey(output.headers, "x-amzn-errortype"); + if (headerKey !== undefined) { + return sanitizeErrorCode(output.headers[headerKey]); + } + if (data.code !== undefined) { + return sanitizeErrorCode(data.code); + } + if (data["__type"] !== undefined) { + return sanitizeErrorCode(data["__type"]); + } + return ""; +}; + + +/***/ }), + +/***/ 9756: +/***/ ((__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__(3966)); +const config_resolver_1 = __nccwpck_require__(6153); +const hash_node_1 = __nccwpck_require__(7442); +const middleware_retry_1 = __nccwpck_require__(6064); +const node_config_provider_1 = __nccwpck_require__(7684); +const node_http_handler_1 = __nccwpck_require__(8805); +const util_base64_node_1 = __nccwpck_require__(8588); +const util_body_length_node_1 = __nccwpck_require__(4147); +const util_user_agent_node_1 = __nccwpck_require__(8095); +const util_utf8_node_1 = __nccwpck_require__(6278); +const runtimeConfig_shared_1 = __nccwpck_require__(4355); +const smithy_client_1 = __nccwpck_require__(4963); +const getRuntimeConfig = (config) => { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; + smithy_client_1.emitWarningIfUnsupportedVersion(process.version); + const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "node", + base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64, + base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64, + bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength, + defaultUserAgentProvider: (_d = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _d !== void 0 ? _d : util_user_agent_node_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: (_e = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _e !== void 0 ? _e : node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: (_f = config === null || config === void 0 ? void 0 : config.region) !== null && _f !== void 0 ? _f : node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: (_g = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _g !== void 0 ? _g : new node_http_handler_1.NodeHttpHandler(), + retryMode: (_h = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _h !== void 0 ? _h : node_config_provider_1.loadConfig(middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS), + sha256: (_j = config === null || config === void 0 ? void 0 : config.sha256) !== null && _j !== void 0 ? _j : hash_node_1.Hash.bind(null, "sha256"), + streamCollector: (_k = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _k !== void 0 ? _k : node_http_handler_1.streamCollector, + useDualstackEndpoint: (_l = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _l !== void 0 ? _l : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _m !== void 0 ? _m : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), + utf8Decoder: (_o = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _o !== void 0 ? _o : util_utf8_node_1.fromUtf8, + utf8Encoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _p !== void 0 ? _p : util_utf8_node_1.toUtf8, + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; + + +/***/ }), + +/***/ 4355: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRuntimeConfig = void 0; +const url_parser_1 = __nccwpck_require__(2992); +const endpoints_1 = __nccwpck_require__(3546); +const getRuntimeConfig = (config) => { + var _a, _b, _c, _d, _e; + return ({ + apiVersion: "2019-06-10", + disableHostPrefix: (_a = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _a !== void 0 ? _a : false, + logger: (_b = config === null || config === void 0 ? void 0 : config.logger) !== null && _b !== void 0 ? _b : {}, + regionInfoProvider: (_c = config === null || config === void 0 ? void 0 : config.regionInfoProvider) !== null && _c !== void 0 ? _c : endpoints_1.defaultRegionInfoProvider, + serviceId: (_d = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _d !== void 0 ? _d : "SSO", + urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : url_parser_1.parseUrl, + }); +}; +exports.getRuntimeConfig = getRuntimeConfig; + + +/***/ }), + +/***/ 2605: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.STS = void 0; +const AssumeRoleCommand_1 = __nccwpck_require__(9802); +const AssumeRoleWithSAMLCommand_1 = __nccwpck_require__(2865); +const AssumeRoleWithWebIdentityCommand_1 = __nccwpck_require__(7451); +const DecodeAuthorizationMessageCommand_1 = __nccwpck_require__(4150); +const GetAccessKeyInfoCommand_1 = __nccwpck_require__(9804); +const GetCallerIdentityCommand_1 = __nccwpck_require__(4278); +const GetFederationTokenCommand_1 = __nccwpck_require__(7552); +const GetSessionTokenCommand_1 = __nccwpck_require__(3285); +const STSClient_1 = __nccwpck_require__(4195); +class STS extends STSClient_1.STSClient { + assumeRole(args, optionsOrCb, cb) { + const command = new AssumeRoleCommand_1.AssumeRoleCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + assumeRoleWithSAML(args, optionsOrCb, cb) { + const command = new AssumeRoleWithSAMLCommand_1.AssumeRoleWithSAMLCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + assumeRoleWithWebIdentity(args, optionsOrCb, cb) { + const command = new AssumeRoleWithWebIdentityCommand_1.AssumeRoleWithWebIdentityCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + decodeAuthorizationMessage(args, optionsOrCb, cb) { + const command = new DecodeAuthorizationMessageCommand_1.DecodeAuthorizationMessageCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + getAccessKeyInfo(args, optionsOrCb, cb) { + const command = new GetAccessKeyInfoCommand_1.GetAccessKeyInfoCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + getCallerIdentity(args, optionsOrCb, cb) { + const command = new GetCallerIdentityCommand_1.GetCallerIdentityCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + getFederationToken(args, optionsOrCb, cb) { + const command = new GetFederationTokenCommand_1.GetFederationTokenCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } + getSessionToken(args, optionsOrCb, cb) { + const command = new GetSessionTokenCommand_1.GetSessionTokenCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + } +} +exports.STS = STS; + + +/***/ }), + +/***/ 4195: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.STSClient = void 0; +const config_resolver_1 = __nccwpck_require__(6153); +const middleware_content_length_1 = __nccwpck_require__(2245); +const middleware_host_header_1 = __nccwpck_require__(2545); +const middleware_logger_1 = __nccwpck_require__(14); +const middleware_retry_1 = __nccwpck_require__(6064); +const middleware_sdk_sts_1 = __nccwpck_require__(5959); +const middleware_user_agent_1 = __nccwpck_require__(4688); +const smithy_client_1 = __nccwpck_require__(4963); +const runtimeConfig_1 = __nccwpck_require__(3405); +class STSClient extends smithy_client_1.Client { + constructor(configuration) { + const _config_0 = runtimeConfig_1.getRuntimeConfig(configuration); + const _config_1 = config_resolver_1.resolveRegionConfig(_config_0); + const _config_2 = config_resolver_1.resolveEndpointsConfig(_config_1); + const _config_3 = middleware_retry_1.resolveRetryConfig(_config_2); + const _config_4 = middleware_host_header_1.resolveHostHeaderConfig(_config_3); + const _config_5 = middleware_sdk_sts_1.resolveStsAuthConfig(_config_4, { stsClientCtor: STSClient }); + const _config_6 = middleware_user_agent_1.resolveUserAgentConfig(_config_5); + super(_config_6); + this.config = _config_6; + this.middlewareStack.use(middleware_retry_1.getRetryPlugin(this.config)); + this.middlewareStack.use(middleware_content_length_1.getContentLengthPlugin(this.config)); + this.middlewareStack.use(middleware_host_header_1.getHostHeaderPlugin(this.config)); + this.middlewareStack.use(middleware_logger_1.getLoggerPlugin(this.config)); + this.middlewareStack.use(middleware_user_agent_1.getUserAgentPlugin(this.config)); + } + destroy() { + super.destroy(); + } +} +exports.STSClient = STSClient; + + +/***/ }), + +/***/ 9802: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AssumeRoleCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const middleware_signing_1 = __nccwpck_require__(4935); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(1780); +const Aws_query_1 = __nccwpck_require__(740); +class AssumeRoleCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "STSClient"; + const commandName = "AssumeRoleCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AssumeRoleRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AssumeRoleResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryAssumeRoleCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryAssumeRoleCommand(output, context); + } +} +exports.AssumeRoleCommand = AssumeRoleCommand; + + +/***/ }), + +/***/ 2865: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AssumeRoleWithSAMLCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(1780); +const Aws_query_1 = __nccwpck_require__(740); +class AssumeRoleWithSAMLCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "STSClient"; + const commandName = "AssumeRoleWithSAMLCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AssumeRoleWithSAMLRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AssumeRoleWithSAMLResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryAssumeRoleWithSAMLCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryAssumeRoleWithSAMLCommand(output, context); + } +} +exports.AssumeRoleWithSAMLCommand = AssumeRoleWithSAMLCommand; + + +/***/ }), + +/***/ 7451: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AssumeRoleWithWebIdentityCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(1780); +const Aws_query_1 = __nccwpck_require__(740); +class AssumeRoleWithWebIdentityCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "STSClient"; + const commandName = "AssumeRoleWithWebIdentityCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.AssumeRoleWithWebIdentityRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.AssumeRoleWithWebIdentityResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryAssumeRoleWithWebIdentityCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryAssumeRoleWithWebIdentityCommand(output, context); + } +} +exports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand; + + +/***/ }), + +/***/ 4150: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DecodeAuthorizationMessageCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const middleware_signing_1 = __nccwpck_require__(4935); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(1780); +const Aws_query_1 = __nccwpck_require__(740); +class DecodeAuthorizationMessageCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "STSClient"; + const commandName = "DecodeAuthorizationMessageCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.DecodeAuthorizationMessageRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.DecodeAuthorizationMessageResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryDecodeAuthorizationMessageCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryDecodeAuthorizationMessageCommand(output, context); + } +} +exports.DecodeAuthorizationMessageCommand = DecodeAuthorizationMessageCommand; + + +/***/ }), + +/***/ 9804: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetAccessKeyInfoCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const middleware_signing_1 = __nccwpck_require__(4935); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(1780); +const Aws_query_1 = __nccwpck_require__(740); +class GetAccessKeyInfoCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "STSClient"; + const commandName = "GetAccessKeyInfoCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetAccessKeyInfoRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetAccessKeyInfoResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryGetAccessKeyInfoCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryGetAccessKeyInfoCommand(output, context); + } +} +exports.GetAccessKeyInfoCommand = GetAccessKeyInfoCommand; + + +/***/ }), + +/***/ 4278: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetCallerIdentityCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const middleware_signing_1 = __nccwpck_require__(4935); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(1780); +const Aws_query_1 = __nccwpck_require__(740); +class GetCallerIdentityCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "STSClient"; + const commandName = "GetCallerIdentityCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetCallerIdentityRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetCallerIdentityResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryGetCallerIdentityCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryGetCallerIdentityCommand(output, context); + } +} +exports.GetCallerIdentityCommand = GetCallerIdentityCommand; + + +/***/ }), + +/***/ 7552: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetFederationTokenCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const middleware_signing_1 = __nccwpck_require__(4935); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(1780); +const Aws_query_1 = __nccwpck_require__(740); +class GetFederationTokenCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "STSClient"; + const commandName = "GetFederationTokenCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetFederationTokenRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetFederationTokenResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryGetFederationTokenCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryGetFederationTokenCommand(output, context); + } +} +exports.GetFederationTokenCommand = GetFederationTokenCommand; + + +/***/ }), + +/***/ 3285: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetSessionTokenCommand = void 0; +const middleware_serde_1 = __nccwpck_require__(3631); +const middleware_signing_1 = __nccwpck_require__(4935); +const smithy_client_1 = __nccwpck_require__(4963); +const models_0_1 = __nccwpck_require__(1780); +const Aws_query_1 = __nccwpck_require__(740); +class GetSessionTokenCommand extends smithy_client_1.Command { + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(middleware_signing_1.getAwsAuthPlugin(configuration)); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "STSClient"; + const commandName = "GetSessionTokenCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: models_0_1.GetSessionTokenRequest.filterSensitiveLog, + outputFilterSensitiveLog: models_0_1.GetSessionTokenResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return Aws_query_1.serializeAws_queryGetSessionTokenCommand(input, context); + } + deserialize(output, context) { + return Aws_query_1.deserializeAws_queryGetSessionTokenCommand(output, context); + } +} +exports.GetSessionTokenCommand = GetSessionTokenCommand; + + +/***/ }), + +/***/ 5716: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(9802), exports); +tslib_1.__exportStar(__nccwpck_require__(2865), exports); +tslib_1.__exportStar(__nccwpck_require__(7451), exports); +tslib_1.__exportStar(__nccwpck_require__(4150), exports); +tslib_1.__exportStar(__nccwpck_require__(9804), exports); +tslib_1.__exportStar(__nccwpck_require__(4278), exports); +tslib_1.__exportStar(__nccwpck_require__(7552), exports); +tslib_1.__exportStar(__nccwpck_require__(3285), exports); + + +/***/ }), + +/***/ 8028: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.decorateDefaultCredentialProvider = exports.getDefaultRoleAssumerWithWebIdentity = exports.getDefaultRoleAssumer = void 0; +const defaultStsRoleAssumers_1 = __nccwpck_require__(48); +const STSClient_1 = __nccwpck_require__(4195); +const getDefaultRoleAssumer = (stsOptions = {}) => defaultStsRoleAssumers_1.getDefaultRoleAssumer(stsOptions, STSClient_1.STSClient); +exports.getDefaultRoleAssumer = getDefaultRoleAssumer; +const getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}) => defaultStsRoleAssumers_1.getDefaultRoleAssumerWithWebIdentity(stsOptions, STSClient_1.STSClient); +exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity; +const decorateDefaultCredentialProvider = (provider) => (input) => provider({ + roleAssumer: exports.getDefaultRoleAssumer(input), + roleAssumerWithWebIdentity: exports.getDefaultRoleAssumerWithWebIdentity(input), + ...input, +}); +exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider; + + +/***/ }), + +/***/ 48: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.decorateDefaultCredentialProvider = exports.getDefaultRoleAssumerWithWebIdentity = exports.getDefaultRoleAssumer = void 0; +const AssumeRoleCommand_1 = __nccwpck_require__(9802); +const AssumeRoleWithWebIdentityCommand_1 = __nccwpck_require__(7451); +const ASSUME_ROLE_DEFAULT_REGION = "us-east-1"; +const decorateDefaultRegion = (region) => { + if (typeof region !== "function") { + return region === undefined ? ASSUME_ROLE_DEFAULT_REGION : region; + } + return async () => { + try { + return await region(); + } + catch (e) { + return ASSUME_ROLE_DEFAULT_REGION; + } + }; +}; +const getDefaultRoleAssumer = (stsOptions, stsClientCtor) => { + let stsClient; + let closureSourceCreds; + return async (sourceCreds, params) => { + closureSourceCreds = sourceCreds; + if (!stsClient) { + const { logger, region, requestHandler } = stsOptions; + stsClient = new stsClientCtor({ + logger, + credentialDefaultProvider: () => async () => closureSourceCreds, + region: decorateDefaultRegion(region || stsOptions.region), + ...(requestHandler ? { requestHandler } : {}), + }); + } + const { Credentials } = await stsClient.send(new AssumeRoleCommand_1.AssumeRoleCommand(params)); + if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) { + throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`); + } + return { + accessKeyId: Credentials.AccessKeyId, + secretAccessKey: Credentials.SecretAccessKey, + sessionToken: Credentials.SessionToken, + expiration: Credentials.Expiration, + }; + }; +}; +exports.getDefaultRoleAssumer = getDefaultRoleAssumer; +const getDefaultRoleAssumerWithWebIdentity = (stsOptions, stsClientCtor) => { + let stsClient; + return async (params) => { + if (!stsClient) { + const { logger, region, requestHandler } = stsOptions; + stsClient = new stsClientCtor({ + logger, + region: decorateDefaultRegion(region || stsOptions.region), + ...(requestHandler ? { requestHandler } : {}), + }); + } + const { Credentials } = await stsClient.send(new AssumeRoleWithWebIdentityCommand_1.AssumeRoleWithWebIdentityCommand(params)); + if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) { + throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`); + } + return { + accessKeyId: Credentials.AccessKeyId, + secretAccessKey: Credentials.SecretAccessKey, + sessionToken: Credentials.SessionToken, + expiration: Credentials.Expiration, + }; + }; +}; +exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity; +const decorateDefaultCredentialProvider = (provider) => (input) => provider({ + roleAssumer: exports.getDefaultRoleAssumer(input, input.stsClientCtor), + roleAssumerWithWebIdentity: exports.getDefaultRoleAssumerWithWebIdentity(input, input.stsClientCtor), + ...input, +}); +exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider; + + +/***/ }), + +/***/ 3571: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultRegionInfoProvider = void 0; +const config_resolver_1 = __nccwpck_require__(6153); +const regionHash = { + "aws-global": { + variants: [ + { + hostname: "sts.amazonaws.com", + tags: [], + }, + ], + signingRegion: "us-east-1", + }, + "us-east-1": { + variants: [ + { + hostname: "sts.us-east-1.amazonaws.com", + tags: [], + }, + { + hostname: "sts-fips.us-east-1.amazonaws.com", + tags: ["fips"], + }, + ], + }, + "us-east-2": { + variants: [ + { + hostname: "sts.us-east-2.amazonaws.com", + tags: [], + }, + { + hostname: "sts-fips.us-east-2.amazonaws.com", + tags: ["fips"], + }, + ], + }, + "us-gov-east-1": { + variants: [ + { + hostname: "sts.us-gov-east-1.amazonaws.com", + tags: [], + }, + { + hostname: "sts.us-gov-east-1.amazonaws.com", + tags: ["fips"], + }, + ], + }, + "us-gov-west-1": { + variants: [ + { + hostname: "sts.us-gov-west-1.amazonaws.com", + tags: [], + }, + { + hostname: "sts.us-gov-west-1.amazonaws.com", + tags: ["fips"], + }, + ], + }, + "us-west-1": { + variants: [ + { + hostname: "sts.us-west-1.amazonaws.com", + tags: [], + }, + { + hostname: "sts-fips.us-west-1.amazonaws.com", + tags: ["fips"], + }, + ], + }, + "us-west-2": { + variants: [ + { + hostname: "sts.us-west-2.amazonaws.com", + tags: [], + }, + { + hostname: "sts-fips.us-west-2.amazonaws.com", + tags: ["fips"], + }, + ], + }, +}; +const partitionHash = { + aws: { + regions: [ + "af-south-1", + "ap-east-1", + "ap-northeast-1", + "ap-northeast-2", + "ap-northeast-3", + "ap-south-1", + "ap-southeast-1", + "ap-southeast-2", + "aws-global", + "ca-central-1", + "eu-central-1", + "eu-north-1", + "eu-south-1", + "eu-west-1", + "eu-west-2", + "eu-west-3", + "me-south-1", + "sa-east-1", + "us-east-1", + "us-east-1-fips", + "us-east-2", + "us-east-2-fips", + "us-west-1", + "us-west-1-fips", + "us-west-2", + "us-west-2-fips", + ], + regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "sts.{region}.amazonaws.com", + tags: [], + }, + { + hostname: "sts-fips.{region}.amazonaws.com", + tags: ["fips"], + }, + { + hostname: "sts-fips.{region}.api.aws", + tags: ["dualstack", "fips"], + }, + { + hostname: "sts.{region}.api.aws", + tags: ["dualstack"], + }, + ], + }, + "aws-cn": { + regions: ["cn-north-1", "cn-northwest-1"], + regionRegex: "^cn\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "sts.{region}.amazonaws.com.cn", + tags: [], + }, + { + hostname: "sts-fips.{region}.amazonaws.com.cn", + tags: ["fips"], + }, + { + hostname: "sts-fips.{region}.api.amazonwebservices.com.cn", + tags: ["dualstack", "fips"], + }, + { + hostname: "sts.{region}.api.amazonwebservices.com.cn", + tags: ["dualstack"], + }, + ], + }, + "aws-iso": { + regions: ["us-iso-east-1", "us-iso-west-1"], + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "sts.{region}.c2s.ic.gov", + tags: [], + }, + { + hostname: "sts-fips.{region}.c2s.ic.gov", + tags: ["fips"], + }, + ], + }, + "aws-iso-b": { + regions: ["us-isob-east-1"], + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "sts.{region}.sc2s.sgov.gov", + tags: [], + }, + { + hostname: "sts-fips.{region}.sc2s.sgov.gov", + tags: ["fips"], + }, + ], + }, + "aws-us-gov": { + regions: ["us-gov-east-1", "us-gov-east-1-fips", "us-gov-west-1", "us-gov-west-1-fips"], + regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "sts.{region}.amazonaws.com", + tags: [], + }, + { + hostname: "sts.{region}.amazonaws.com", + tags: ["fips"], + }, + { + hostname: "sts-fips.{region}.api.aws", + tags: ["dualstack", "fips"], + }, + { + hostname: "sts.{region}.api.aws", + tags: ["dualstack"], + }, + ], + }, +}; +const defaultRegionInfoProvider = async (region, options) => config_resolver_1.getRegionInfo(region, { + ...options, + signingService: "sts", + regionHash, + partitionHash, +}); +exports.defaultRegionInfoProvider = defaultRegionInfoProvider; + + +/***/ }), + +/***/ 2209: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(2605), exports); +tslib_1.__exportStar(__nccwpck_require__(4195), exports); +tslib_1.__exportStar(__nccwpck_require__(5716), exports); +tslib_1.__exportStar(__nccwpck_require__(8028), exports); +tslib_1.__exportStar(__nccwpck_require__(106), exports); + + +/***/ }), + +/***/ 106: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(1780), exports); + + +/***/ }), + +/***/ 1780: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GetSessionTokenResponse = exports.GetSessionTokenRequest = exports.GetFederationTokenResponse = exports.FederatedUser = exports.GetFederationTokenRequest = exports.GetCallerIdentityResponse = exports.GetCallerIdentityRequest = exports.GetAccessKeyInfoResponse = exports.GetAccessKeyInfoRequest = exports.InvalidAuthorizationMessageException = exports.DecodeAuthorizationMessageResponse = exports.DecodeAuthorizationMessageRequest = exports.IDPCommunicationErrorException = exports.AssumeRoleWithWebIdentityResponse = exports.AssumeRoleWithWebIdentityRequest = exports.InvalidIdentityTokenException = exports.IDPRejectedClaimException = exports.AssumeRoleWithSAMLResponse = exports.AssumeRoleWithSAMLRequest = exports.RegionDisabledException = exports.PackedPolicyTooLargeException = exports.MalformedPolicyDocumentException = exports.ExpiredTokenException = exports.AssumeRoleResponse = exports.Credentials = exports.AssumeRoleRequest = exports.Tag = exports.PolicyDescriptorType = exports.AssumedRoleUser = void 0; +var AssumedRoleUser; +(function (AssumedRoleUser) { + AssumedRoleUser.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AssumedRoleUser = exports.AssumedRoleUser || (exports.AssumedRoleUser = {})); +var PolicyDescriptorType; +(function (PolicyDescriptorType) { + PolicyDescriptorType.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PolicyDescriptorType = exports.PolicyDescriptorType || (exports.PolicyDescriptorType = {})); +var Tag; +(function (Tag) { + Tag.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Tag = exports.Tag || (exports.Tag = {})); +var AssumeRoleRequest; +(function (AssumeRoleRequest) { + AssumeRoleRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AssumeRoleRequest = exports.AssumeRoleRequest || (exports.AssumeRoleRequest = {})); +var Credentials; +(function (Credentials) { + Credentials.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(Credentials = exports.Credentials || (exports.Credentials = {})); +var AssumeRoleResponse; +(function (AssumeRoleResponse) { + AssumeRoleResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AssumeRoleResponse = exports.AssumeRoleResponse || (exports.AssumeRoleResponse = {})); +var ExpiredTokenException; +(function (ExpiredTokenException) { + ExpiredTokenException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(ExpiredTokenException = exports.ExpiredTokenException || (exports.ExpiredTokenException = {})); +var MalformedPolicyDocumentException; +(function (MalformedPolicyDocumentException) { + MalformedPolicyDocumentException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(MalformedPolicyDocumentException = exports.MalformedPolicyDocumentException || (exports.MalformedPolicyDocumentException = {})); +var PackedPolicyTooLargeException; +(function (PackedPolicyTooLargeException) { + PackedPolicyTooLargeException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(PackedPolicyTooLargeException = exports.PackedPolicyTooLargeException || (exports.PackedPolicyTooLargeException = {})); +var RegionDisabledException; +(function (RegionDisabledException) { + RegionDisabledException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(RegionDisabledException = exports.RegionDisabledException || (exports.RegionDisabledException = {})); +var AssumeRoleWithSAMLRequest; +(function (AssumeRoleWithSAMLRequest) { + AssumeRoleWithSAMLRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AssumeRoleWithSAMLRequest = exports.AssumeRoleWithSAMLRequest || (exports.AssumeRoleWithSAMLRequest = {})); +var AssumeRoleWithSAMLResponse; +(function (AssumeRoleWithSAMLResponse) { + AssumeRoleWithSAMLResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AssumeRoleWithSAMLResponse = exports.AssumeRoleWithSAMLResponse || (exports.AssumeRoleWithSAMLResponse = {})); +var IDPRejectedClaimException; +(function (IDPRejectedClaimException) { + IDPRejectedClaimException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(IDPRejectedClaimException = exports.IDPRejectedClaimException || (exports.IDPRejectedClaimException = {})); +var InvalidIdentityTokenException; +(function (InvalidIdentityTokenException) { + InvalidIdentityTokenException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidIdentityTokenException = exports.InvalidIdentityTokenException || (exports.InvalidIdentityTokenException = {})); +var AssumeRoleWithWebIdentityRequest; +(function (AssumeRoleWithWebIdentityRequest) { + AssumeRoleWithWebIdentityRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AssumeRoleWithWebIdentityRequest = exports.AssumeRoleWithWebIdentityRequest || (exports.AssumeRoleWithWebIdentityRequest = {})); +var AssumeRoleWithWebIdentityResponse; +(function (AssumeRoleWithWebIdentityResponse) { + AssumeRoleWithWebIdentityResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(AssumeRoleWithWebIdentityResponse = exports.AssumeRoleWithWebIdentityResponse || (exports.AssumeRoleWithWebIdentityResponse = {})); +var IDPCommunicationErrorException; +(function (IDPCommunicationErrorException) { + IDPCommunicationErrorException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(IDPCommunicationErrorException = exports.IDPCommunicationErrorException || (exports.IDPCommunicationErrorException = {})); +var DecodeAuthorizationMessageRequest; +(function (DecodeAuthorizationMessageRequest) { + DecodeAuthorizationMessageRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DecodeAuthorizationMessageRequest = exports.DecodeAuthorizationMessageRequest || (exports.DecodeAuthorizationMessageRequest = {})); +var DecodeAuthorizationMessageResponse; +(function (DecodeAuthorizationMessageResponse) { + DecodeAuthorizationMessageResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(DecodeAuthorizationMessageResponse = exports.DecodeAuthorizationMessageResponse || (exports.DecodeAuthorizationMessageResponse = {})); +var InvalidAuthorizationMessageException; +(function (InvalidAuthorizationMessageException) { + InvalidAuthorizationMessageException.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(InvalidAuthorizationMessageException = exports.InvalidAuthorizationMessageException || (exports.InvalidAuthorizationMessageException = {})); +var GetAccessKeyInfoRequest; +(function (GetAccessKeyInfoRequest) { + GetAccessKeyInfoRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetAccessKeyInfoRequest = exports.GetAccessKeyInfoRequest || (exports.GetAccessKeyInfoRequest = {})); +var GetAccessKeyInfoResponse; +(function (GetAccessKeyInfoResponse) { + GetAccessKeyInfoResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetAccessKeyInfoResponse = exports.GetAccessKeyInfoResponse || (exports.GetAccessKeyInfoResponse = {})); +var GetCallerIdentityRequest; +(function (GetCallerIdentityRequest) { + GetCallerIdentityRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetCallerIdentityRequest = exports.GetCallerIdentityRequest || (exports.GetCallerIdentityRequest = {})); +var GetCallerIdentityResponse; +(function (GetCallerIdentityResponse) { + GetCallerIdentityResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetCallerIdentityResponse = exports.GetCallerIdentityResponse || (exports.GetCallerIdentityResponse = {})); +var GetFederationTokenRequest; +(function (GetFederationTokenRequest) { + GetFederationTokenRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetFederationTokenRequest = exports.GetFederationTokenRequest || (exports.GetFederationTokenRequest = {})); +var FederatedUser; +(function (FederatedUser) { + FederatedUser.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(FederatedUser = exports.FederatedUser || (exports.FederatedUser = {})); +var GetFederationTokenResponse; +(function (GetFederationTokenResponse) { + GetFederationTokenResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetFederationTokenResponse = exports.GetFederationTokenResponse || (exports.GetFederationTokenResponse = {})); +var GetSessionTokenRequest; +(function (GetSessionTokenRequest) { + GetSessionTokenRequest.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetSessionTokenRequest = exports.GetSessionTokenRequest || (exports.GetSessionTokenRequest = {})); +var GetSessionTokenResponse; +(function (GetSessionTokenResponse) { + GetSessionTokenResponse.filterSensitiveLog = (obj) => ({ + ...obj, + }); +})(GetSessionTokenResponse = exports.GetSessionTokenResponse || (exports.GetSessionTokenResponse = {})); + + +/***/ }), + +/***/ 740: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.deserializeAws_queryGetSessionTokenCommand = exports.deserializeAws_queryGetFederationTokenCommand = exports.deserializeAws_queryGetCallerIdentityCommand = exports.deserializeAws_queryGetAccessKeyInfoCommand = exports.deserializeAws_queryDecodeAuthorizationMessageCommand = exports.deserializeAws_queryAssumeRoleWithWebIdentityCommand = exports.deserializeAws_queryAssumeRoleWithSAMLCommand = exports.deserializeAws_queryAssumeRoleCommand = exports.serializeAws_queryGetSessionTokenCommand = exports.serializeAws_queryGetFederationTokenCommand = exports.serializeAws_queryGetCallerIdentityCommand = exports.serializeAws_queryGetAccessKeyInfoCommand = exports.serializeAws_queryDecodeAuthorizationMessageCommand = exports.serializeAws_queryAssumeRoleWithWebIdentityCommand = exports.serializeAws_queryAssumeRoleWithSAMLCommand = exports.serializeAws_queryAssumeRoleCommand = void 0; +const protocol_http_1 = __nccwpck_require__(223); +const smithy_client_1 = __nccwpck_require__(4963); +const entities_1 = __nccwpck_require__(3000); +const fast_xml_parser_1 = __nccwpck_require__(7448); +const serializeAws_queryAssumeRoleCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryAssumeRoleRequest(input, context), + Action: "AssumeRole", + Version: "2011-06-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryAssumeRoleCommand = serializeAws_queryAssumeRoleCommand; +const serializeAws_queryAssumeRoleWithSAMLCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryAssumeRoleWithSAMLRequest(input, context), + Action: "AssumeRoleWithSAML", + Version: "2011-06-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryAssumeRoleWithSAMLCommand = serializeAws_queryAssumeRoleWithSAMLCommand; +const serializeAws_queryAssumeRoleWithWebIdentityCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryAssumeRoleWithWebIdentityRequest(input, context), + Action: "AssumeRoleWithWebIdentity", + Version: "2011-06-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryAssumeRoleWithWebIdentityCommand = serializeAws_queryAssumeRoleWithWebIdentityCommand; +const serializeAws_queryDecodeAuthorizationMessageCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryDecodeAuthorizationMessageRequest(input, context), + Action: "DecodeAuthorizationMessage", + Version: "2011-06-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryDecodeAuthorizationMessageCommand = serializeAws_queryDecodeAuthorizationMessageCommand; +const serializeAws_queryGetAccessKeyInfoCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryGetAccessKeyInfoRequest(input, context), + Action: "GetAccessKeyInfo", + Version: "2011-06-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryGetAccessKeyInfoCommand = serializeAws_queryGetAccessKeyInfoCommand; +const serializeAws_queryGetCallerIdentityCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryGetCallerIdentityRequest(input, context), + Action: "GetCallerIdentity", + Version: "2011-06-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryGetCallerIdentityCommand = serializeAws_queryGetCallerIdentityCommand; +const serializeAws_queryGetFederationTokenCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryGetFederationTokenRequest(input, context), + Action: "GetFederationToken", + Version: "2011-06-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryGetFederationTokenCommand = serializeAws_queryGetFederationTokenCommand; +const serializeAws_queryGetSessionTokenCommand = async (input, context) => { + const headers = { + "content-type": "application/x-www-form-urlencoded", + }; + let body; + body = buildFormUrlencodedString({ + ...serializeAws_queryGetSessionTokenRequest(input, context), + Action: "GetSessionToken", + Version: "2011-06-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; +exports.serializeAws_queryGetSessionTokenCommand = serializeAws_queryGetSessionTokenCommand; +const deserializeAws_queryAssumeRoleCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryAssumeRoleCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryAssumeRoleResponse(data.AssumeRoleResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryAssumeRoleCommand = deserializeAws_queryAssumeRoleCommand; +const deserializeAws_queryAssumeRoleCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ExpiredTokenException": + case "com.amazonaws.sts#ExpiredTokenException": + response = { + ...(await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "MalformedPolicyDocumentException": + case "com.amazonaws.sts#MalformedPolicyDocumentException": + response = { + ...(await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PackedPolicyTooLargeException": + case "com.amazonaws.sts#PackedPolicyTooLargeException": + response = { + ...(await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RegionDisabledException": + case "com.amazonaws.sts#RegionDisabledException": + response = { + ...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode; + response = { + ...parsedBody.Error, + name: `${errorCode}`, + message: parsedBody.Error.message || parsedBody.Error.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_queryAssumeRoleWithSAMLCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryAssumeRoleWithSAMLCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryAssumeRoleWithSAMLResponse(data.AssumeRoleWithSAMLResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryAssumeRoleWithSAMLCommand = deserializeAws_queryAssumeRoleWithSAMLCommand; +const deserializeAws_queryAssumeRoleWithSAMLCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ExpiredTokenException": + case "com.amazonaws.sts#ExpiredTokenException": + response = { + ...(await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "IDPRejectedClaimException": + case "com.amazonaws.sts#IDPRejectedClaimException": + response = { + ...(await deserializeAws_queryIDPRejectedClaimExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidIdentityTokenException": + case "com.amazonaws.sts#InvalidIdentityTokenException": + response = { + ...(await deserializeAws_queryInvalidIdentityTokenExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "MalformedPolicyDocumentException": + case "com.amazonaws.sts#MalformedPolicyDocumentException": + response = { + ...(await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PackedPolicyTooLargeException": + case "com.amazonaws.sts#PackedPolicyTooLargeException": + response = { + ...(await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RegionDisabledException": + case "com.amazonaws.sts#RegionDisabledException": + response = { + ...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode; + response = { + ...parsedBody.Error, + name: `${errorCode}`, + message: parsedBody.Error.message || parsedBody.Error.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_queryAssumeRoleWithWebIdentityCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryAssumeRoleWithWebIdentityCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryAssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryAssumeRoleWithWebIdentityCommand = deserializeAws_queryAssumeRoleWithWebIdentityCommand; +const deserializeAws_queryAssumeRoleWithWebIdentityCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ExpiredTokenException": + case "com.amazonaws.sts#ExpiredTokenException": + response = { + ...(await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "IDPCommunicationErrorException": + case "com.amazonaws.sts#IDPCommunicationErrorException": + response = { + ...(await deserializeAws_queryIDPCommunicationErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "IDPRejectedClaimException": + case "com.amazonaws.sts#IDPRejectedClaimException": + response = { + ...(await deserializeAws_queryIDPRejectedClaimExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidIdentityTokenException": + case "com.amazonaws.sts#InvalidIdentityTokenException": + response = { + ...(await deserializeAws_queryInvalidIdentityTokenExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "MalformedPolicyDocumentException": + case "com.amazonaws.sts#MalformedPolicyDocumentException": + response = { + ...(await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PackedPolicyTooLargeException": + case "com.amazonaws.sts#PackedPolicyTooLargeException": + response = { + ...(await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RegionDisabledException": + case "com.amazonaws.sts#RegionDisabledException": + response = { + ...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode; + response = { + ...parsedBody.Error, + name: `${errorCode}`, + message: parsedBody.Error.message || parsedBody.Error.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_queryDecodeAuthorizationMessageCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryDecodeAuthorizationMessageCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryDecodeAuthorizationMessageResponse(data.DecodeAuthorizationMessageResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryDecodeAuthorizationMessageCommand = deserializeAws_queryDecodeAuthorizationMessageCommand; +const deserializeAws_queryDecodeAuthorizationMessageCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidAuthorizationMessageException": + case "com.amazonaws.sts#InvalidAuthorizationMessageException": + response = { + ...(await deserializeAws_queryInvalidAuthorizationMessageExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode; + response = { + ...parsedBody.Error, + name: `${errorCode}`, + message: parsedBody.Error.message || parsedBody.Error.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_queryGetAccessKeyInfoCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryGetAccessKeyInfoCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryGetAccessKeyInfoResponse(data.GetAccessKeyInfoResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryGetAccessKeyInfoCommand = deserializeAws_queryGetAccessKeyInfoCommand; +const deserializeAws_queryGetAccessKeyInfoCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode; + response = { + ...parsedBody.Error, + name: `${errorCode}`, + message: parsedBody.Error.message || parsedBody.Error.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_queryGetCallerIdentityCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryGetCallerIdentityCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryGetCallerIdentityResponse(data.GetCallerIdentityResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryGetCallerIdentityCommand = deserializeAws_queryGetCallerIdentityCommand; +const deserializeAws_queryGetCallerIdentityCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode; + response = { + ...parsedBody.Error, + name: `${errorCode}`, + message: parsedBody.Error.message || parsedBody.Error.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_queryGetFederationTokenCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryGetFederationTokenCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryGetFederationTokenResponse(data.GetFederationTokenResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryGetFederationTokenCommand = deserializeAws_queryGetFederationTokenCommand; +const deserializeAws_queryGetFederationTokenCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "MalformedPolicyDocumentException": + case "com.amazonaws.sts#MalformedPolicyDocumentException": + response = { + ...(await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PackedPolicyTooLargeException": + case "com.amazonaws.sts#PackedPolicyTooLargeException": + response = { + ...(await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "RegionDisabledException": + case "com.amazonaws.sts#RegionDisabledException": + response = { + ...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode; + response = { + ...parsedBody.Error, + name: `${errorCode}`, + message: parsedBody.Error.message || parsedBody.Error.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_queryGetSessionTokenCommand = async (output, context) => { + if (output.statusCode >= 300) { + return deserializeAws_queryGetSessionTokenCommandError(output, context); + } + const data = await parseBody(output.body, context); + let contents = {}; + contents = deserializeAws_queryGetSessionTokenResponse(data.GetSessionTokenResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; +exports.deserializeAws_queryGetSessionTokenCommand = deserializeAws_queryGetSessionTokenCommand; +const deserializeAws_queryGetSessionTokenCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseBody(output.body, context), + }; + let response; + let errorCode = "UnknownError"; + errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "RegionDisabledException": + case "com.amazonaws.sts#RegionDisabledException": + response = { + ...(await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode; + response = { + ...parsedBody.Error, + name: `${errorCode}`, + message: parsedBody.Error.message || parsedBody.Error.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; +const deserializeAws_queryExpiredTokenExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryExpiredTokenException(body.Error, context); + const contents = { + name: "ExpiredTokenException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryIDPCommunicationErrorExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryIDPCommunicationErrorException(body.Error, context); + const contents = { + name: "IDPCommunicationErrorException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryIDPRejectedClaimExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryIDPRejectedClaimException(body.Error, context); + const contents = { + name: "IDPRejectedClaimException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryInvalidAuthorizationMessageExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryInvalidAuthorizationMessageException(body.Error, context); + const contents = { + name: "InvalidAuthorizationMessageException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryInvalidIdentityTokenExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryInvalidIdentityTokenException(body.Error, context); + const contents = { + name: "InvalidIdentityTokenException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryMalformedPolicyDocumentExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryMalformedPolicyDocumentException(body.Error, context); + const contents = { + name: "MalformedPolicyDocumentException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryPackedPolicyTooLargeExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryPackedPolicyTooLargeException(body.Error, context); + const contents = { + name: "PackedPolicyTooLargeException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const deserializeAws_queryRegionDisabledExceptionResponse = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = deserializeAws_queryRegionDisabledException(body.Error, context); + const contents = { + name: "RegionDisabledException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; +const serializeAws_queryAssumeRoleRequest = (input, context) => { + const entries = {}; + if (input.RoleArn !== undefined && input.RoleArn !== null) { + entries["RoleArn"] = input.RoleArn; + } + if (input.RoleSessionName !== undefined && input.RoleSessionName !== null) { + entries["RoleSessionName"] = input.RoleSessionName; + } + if (input.PolicyArns !== undefined && input.PolicyArns !== null) { + const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input.Policy !== undefined && input.Policy !== null) { + entries["Policy"] = input.Policy; + } + if (input.DurationSeconds !== undefined && input.DurationSeconds !== null) { + entries["DurationSeconds"] = input.DurationSeconds; + } + if (input.Tags !== undefined && input.Tags !== null) { + const memberEntries = serializeAws_querytagListType(input.Tags, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Tags.${key}`; + entries[loc] = value; + }); + } + if (input.TransitiveTagKeys !== undefined && input.TransitiveTagKeys !== null) { + const memberEntries = serializeAws_querytagKeyListType(input.TransitiveTagKeys, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `TransitiveTagKeys.${key}`; + entries[loc] = value; + }); + } + if (input.ExternalId !== undefined && input.ExternalId !== null) { + entries["ExternalId"] = input.ExternalId; + } + if (input.SerialNumber !== undefined && input.SerialNumber !== null) { + entries["SerialNumber"] = input.SerialNumber; + } + if (input.TokenCode !== undefined && input.TokenCode !== null) { + entries["TokenCode"] = input.TokenCode; + } + if (input.SourceIdentity !== undefined && input.SourceIdentity !== null) { + entries["SourceIdentity"] = input.SourceIdentity; + } + return entries; +}; +const serializeAws_queryAssumeRoleWithSAMLRequest = (input, context) => { + const entries = {}; + if (input.RoleArn !== undefined && input.RoleArn !== null) { + entries["RoleArn"] = input.RoleArn; + } + if (input.PrincipalArn !== undefined && input.PrincipalArn !== null) { + entries["PrincipalArn"] = input.PrincipalArn; + } + if (input.SAMLAssertion !== undefined && input.SAMLAssertion !== null) { + entries["SAMLAssertion"] = input.SAMLAssertion; + } + if (input.PolicyArns !== undefined && input.PolicyArns !== null) { + const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input.Policy !== undefined && input.Policy !== null) { + entries["Policy"] = input.Policy; + } + if (input.DurationSeconds !== undefined && input.DurationSeconds !== null) { + entries["DurationSeconds"] = input.DurationSeconds; + } + return entries; +}; +const serializeAws_queryAssumeRoleWithWebIdentityRequest = (input, context) => { + const entries = {}; + if (input.RoleArn !== undefined && input.RoleArn !== null) { + entries["RoleArn"] = input.RoleArn; + } + if (input.RoleSessionName !== undefined && input.RoleSessionName !== null) { + entries["RoleSessionName"] = input.RoleSessionName; + } + if (input.WebIdentityToken !== undefined && input.WebIdentityToken !== null) { + entries["WebIdentityToken"] = input.WebIdentityToken; + } + if (input.ProviderId !== undefined && input.ProviderId !== null) { + entries["ProviderId"] = input.ProviderId; + } + if (input.PolicyArns !== undefined && input.PolicyArns !== null) { + const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input.Policy !== undefined && input.Policy !== null) { + entries["Policy"] = input.Policy; + } + if (input.DurationSeconds !== undefined && input.DurationSeconds !== null) { + entries["DurationSeconds"] = input.DurationSeconds; + } + return entries; +}; +const serializeAws_queryDecodeAuthorizationMessageRequest = (input, context) => { + const entries = {}; + if (input.EncodedMessage !== undefined && input.EncodedMessage !== null) { + entries["EncodedMessage"] = input.EncodedMessage; + } + return entries; +}; +const serializeAws_queryGetAccessKeyInfoRequest = (input, context) => { + const entries = {}; + if (input.AccessKeyId !== undefined && input.AccessKeyId !== null) { + entries["AccessKeyId"] = input.AccessKeyId; + } + return entries; +}; +const serializeAws_queryGetCallerIdentityRequest = (input, context) => { + const entries = {}; + return entries; +}; +const serializeAws_queryGetFederationTokenRequest = (input, context) => { + const entries = {}; + if (input.Name !== undefined && input.Name !== null) { + entries["Name"] = input.Name; + } + if (input.Policy !== undefined && input.Policy !== null) { + entries["Policy"] = input.Policy; + } + if (input.PolicyArns !== undefined && input.PolicyArns !== null) { + const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input.DurationSeconds !== undefined && input.DurationSeconds !== null) { + entries["DurationSeconds"] = input.DurationSeconds; + } + if (input.Tags !== undefined && input.Tags !== null) { + const memberEntries = serializeAws_querytagListType(input.Tags, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Tags.${key}`; + entries[loc] = value; + }); + } + return entries; +}; +const serializeAws_queryGetSessionTokenRequest = (input, context) => { + const entries = {}; + if (input.DurationSeconds !== undefined && input.DurationSeconds !== null) { + entries["DurationSeconds"] = input.DurationSeconds; + } + if (input.SerialNumber !== undefined && input.SerialNumber !== null) { + entries["SerialNumber"] = input.SerialNumber; + } + if (input.TokenCode !== undefined && input.TokenCode !== null) { + entries["TokenCode"] = input.TokenCode; + } + return entries; +}; +const serializeAws_querypolicyDescriptorListType = (input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = serializeAws_queryPolicyDescriptorType(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}; +const serializeAws_queryPolicyDescriptorType = (input, context) => { + const entries = {}; + if (input.arn !== undefined && input.arn !== null) { + entries["arn"] = input.arn; + } + return entries; +}; +const serializeAws_queryTag = (input, context) => { + const entries = {}; + if (input.Key !== undefined && input.Key !== null) { + entries["Key"] = input.Key; + } + if (input.Value !== undefined && input.Value !== null) { + entries["Value"] = input.Value; + } + return entries; +}; +const serializeAws_querytagKeyListType = (input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; +const serializeAws_querytagListType = (input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = serializeAws_queryTag(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}; +const deserializeAws_queryAssumedRoleUser = (output, context) => { + const contents = { + AssumedRoleId: undefined, + Arn: undefined, + }; + if (output["AssumedRoleId"] !== undefined) { + contents.AssumedRoleId = smithy_client_1.expectString(output["AssumedRoleId"]); + } + if (output["Arn"] !== undefined) { + contents.Arn = smithy_client_1.expectString(output["Arn"]); + } + return contents; +}; +const deserializeAws_queryAssumeRoleResponse = (output, context) => { + const contents = { + Credentials: undefined, + AssumedRoleUser: undefined, + PackedPolicySize: undefined, + SourceIdentity: undefined, + }; + if (output["Credentials"] !== undefined) { + contents.Credentials = deserializeAws_queryCredentials(output["Credentials"], context); + } + if (output["AssumedRoleUser"] !== undefined) { + contents.AssumedRoleUser = deserializeAws_queryAssumedRoleUser(output["AssumedRoleUser"], context); + } + if (output["PackedPolicySize"] !== undefined) { + contents.PackedPolicySize = smithy_client_1.strictParseInt32(output["PackedPolicySize"]); + } + if (output["SourceIdentity"] !== undefined) { + contents.SourceIdentity = smithy_client_1.expectString(output["SourceIdentity"]); + } + return contents; +}; +const deserializeAws_queryAssumeRoleWithSAMLResponse = (output, context) => { + const contents = { + Credentials: undefined, + AssumedRoleUser: undefined, + PackedPolicySize: undefined, + Subject: undefined, + SubjectType: undefined, + Issuer: undefined, + Audience: undefined, + NameQualifier: undefined, + SourceIdentity: undefined, + }; + if (output["Credentials"] !== undefined) { + contents.Credentials = deserializeAws_queryCredentials(output["Credentials"], context); + } + if (output["AssumedRoleUser"] !== undefined) { + contents.AssumedRoleUser = deserializeAws_queryAssumedRoleUser(output["AssumedRoleUser"], context); + } + if (output["PackedPolicySize"] !== undefined) { + contents.PackedPolicySize = smithy_client_1.strictParseInt32(output["PackedPolicySize"]); + } + if (output["Subject"] !== undefined) { + contents.Subject = smithy_client_1.expectString(output["Subject"]); + } + if (output["SubjectType"] !== undefined) { + contents.SubjectType = smithy_client_1.expectString(output["SubjectType"]); + } + if (output["Issuer"] !== undefined) { + contents.Issuer = smithy_client_1.expectString(output["Issuer"]); + } + if (output["Audience"] !== undefined) { + contents.Audience = smithy_client_1.expectString(output["Audience"]); + } + if (output["NameQualifier"] !== undefined) { + contents.NameQualifier = smithy_client_1.expectString(output["NameQualifier"]); + } + if (output["SourceIdentity"] !== undefined) { + contents.SourceIdentity = smithy_client_1.expectString(output["SourceIdentity"]); + } + return contents; +}; +const deserializeAws_queryAssumeRoleWithWebIdentityResponse = (output, context) => { + const contents = { + Credentials: undefined, + SubjectFromWebIdentityToken: undefined, + AssumedRoleUser: undefined, + PackedPolicySize: undefined, + Provider: undefined, + Audience: undefined, + SourceIdentity: undefined, + }; + if (output["Credentials"] !== undefined) { + contents.Credentials = deserializeAws_queryCredentials(output["Credentials"], context); + } + if (output["SubjectFromWebIdentityToken"] !== undefined) { + contents.SubjectFromWebIdentityToken = smithy_client_1.expectString(output["SubjectFromWebIdentityToken"]); + } + if (output["AssumedRoleUser"] !== undefined) { + contents.AssumedRoleUser = deserializeAws_queryAssumedRoleUser(output["AssumedRoleUser"], context); + } + if (output["PackedPolicySize"] !== undefined) { + contents.PackedPolicySize = smithy_client_1.strictParseInt32(output["PackedPolicySize"]); + } + if (output["Provider"] !== undefined) { + contents.Provider = smithy_client_1.expectString(output["Provider"]); + } + if (output["Audience"] !== undefined) { + contents.Audience = smithy_client_1.expectString(output["Audience"]); + } + if (output["SourceIdentity"] !== undefined) { + contents.SourceIdentity = smithy_client_1.expectString(output["SourceIdentity"]); + } + return contents; +}; +const deserializeAws_queryCredentials = (output, context) => { + const contents = { + AccessKeyId: undefined, + SecretAccessKey: undefined, + SessionToken: undefined, + Expiration: undefined, + }; + if (output["AccessKeyId"] !== undefined) { + contents.AccessKeyId = smithy_client_1.expectString(output["AccessKeyId"]); + } + if (output["SecretAccessKey"] !== undefined) { + contents.SecretAccessKey = smithy_client_1.expectString(output["SecretAccessKey"]); + } + if (output["SessionToken"] !== undefined) { + contents.SessionToken = smithy_client_1.expectString(output["SessionToken"]); + } + if (output["Expiration"] !== undefined) { + contents.Expiration = smithy_client_1.expectNonNull(smithy_client_1.parseRfc3339DateTime(output["Expiration"])); + } + return contents; +}; +const deserializeAws_queryDecodeAuthorizationMessageResponse = (output, context) => { + const contents = { + DecodedMessage: undefined, + }; + if (output["DecodedMessage"] !== undefined) { + contents.DecodedMessage = smithy_client_1.expectString(output["DecodedMessage"]); + } + return contents; +}; +const deserializeAws_queryExpiredTokenException = (output, context) => { + const contents = { + message: undefined, + }; + if (output["message"] !== undefined) { + contents.message = smithy_client_1.expectString(output["message"]); + } + return contents; +}; +const deserializeAws_queryFederatedUser = (output, context) => { + const contents = { + FederatedUserId: undefined, + Arn: undefined, + }; + if (output["FederatedUserId"] !== undefined) { + contents.FederatedUserId = smithy_client_1.expectString(output["FederatedUserId"]); + } + if (output["Arn"] !== undefined) { + contents.Arn = smithy_client_1.expectString(output["Arn"]); + } + return contents; +}; +const deserializeAws_queryGetAccessKeyInfoResponse = (output, context) => { + const contents = { + Account: undefined, + }; + if (output["Account"] !== undefined) { + contents.Account = smithy_client_1.expectString(output["Account"]); + } + return contents; +}; +const deserializeAws_queryGetCallerIdentityResponse = (output, context) => { + const contents = { + UserId: undefined, + Account: undefined, + Arn: undefined, + }; + if (output["UserId"] !== undefined) { + contents.UserId = smithy_client_1.expectString(output["UserId"]); + } + if (output["Account"] !== undefined) { + contents.Account = smithy_client_1.expectString(output["Account"]); + } + if (output["Arn"] !== undefined) { + contents.Arn = smithy_client_1.expectString(output["Arn"]); + } + return contents; +}; +const deserializeAws_queryGetFederationTokenResponse = (output, context) => { + const contents = { + Credentials: undefined, + FederatedUser: undefined, + PackedPolicySize: undefined, + }; + if (output["Credentials"] !== undefined) { + contents.Credentials = deserializeAws_queryCredentials(output["Credentials"], context); + } + if (output["FederatedUser"] !== undefined) { + contents.FederatedUser = deserializeAws_queryFederatedUser(output["FederatedUser"], context); + } + if (output["PackedPolicySize"] !== undefined) { + contents.PackedPolicySize = smithy_client_1.strictParseInt32(output["PackedPolicySize"]); + } + return contents; +}; +const deserializeAws_queryGetSessionTokenResponse = (output, context) => { + const contents = { + Credentials: undefined, + }; + if (output["Credentials"] !== undefined) { + contents.Credentials = deserializeAws_queryCredentials(output["Credentials"], context); + } + return contents; +}; +const deserializeAws_queryIDPCommunicationErrorException = (output, context) => { + const contents = { + message: undefined, + }; + if (output["message"] !== undefined) { + contents.message = smithy_client_1.expectString(output["message"]); + } + return contents; +}; +const deserializeAws_queryIDPRejectedClaimException = (output, context) => { + const contents = { + message: undefined, + }; + if (output["message"] !== undefined) { + contents.message = smithy_client_1.expectString(output["message"]); + } + return contents; +}; +const deserializeAws_queryInvalidAuthorizationMessageException = (output, context) => { + const contents = { + message: undefined, + }; + if (output["message"] !== undefined) { + contents.message = smithy_client_1.expectString(output["message"]); + } + return contents; +}; +const deserializeAws_queryInvalidIdentityTokenException = (output, context) => { + const contents = { + message: undefined, + }; + if (output["message"] !== undefined) { + contents.message = smithy_client_1.expectString(output["message"]); + } + return contents; +}; +const deserializeAws_queryMalformedPolicyDocumentException = (output, context) => { + const contents = { + message: undefined, + }; + if (output["message"] !== undefined) { + contents.message = smithy_client_1.expectString(output["message"]); + } + return contents; +}; +const deserializeAws_queryPackedPolicyTooLargeException = (output, context) => { + const contents = { + message: undefined, + }; + if (output["message"] !== undefined) { + contents.message = smithy_client_1.expectString(output["message"]); + } + return contents; +}; +const deserializeAws_queryRegionDisabledException = (output, context) => { + const contents = { + message: undefined, + }; + if (output["message"] !== undefined) { + contents.message = smithy_client_1.expectString(output["message"]); + } + return contents; +}; +const deserializeMetadata = (output) => { + var _a; + return ({ + httpStatusCode: output.statusCode, + requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], + }); +}; +const collectBody = (streamBody = new Uint8Array(), context) => { + if (streamBody instanceof Uint8Array) { + return Promise.resolve(streamBody); + } + return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); +}; +const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const buildHttpRpcRequest = 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 !== undefined) { + contents.hostname = resolvedHostname; + } + if (body !== undefined) { + contents.body = body; + } + return new protocol_http_1.HttpRequest(contents); +}; +const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + const parsedObj = fast_xml_parser_1.parse(encoded, { + attributeNamePrefix: "", + ignoreAttributes: false, + parseNodeValue: false, + trimValues: false, + tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : entities_1.decodeHTML(val)), + }); + const textNodeName = "#text"; + const key = Object.keys(parsedObj)[0]; + const parsedObjToReturn = parsedObj[key]; + if (parsedObjToReturn[textNodeName]) { + parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; + delete parsedObjToReturn[textNodeName]; + } + return smithy_client_1.getValueFromTextNode(parsedObjToReturn); + } + return {}; +}); +const buildFormUrlencodedString = (formEntries) => Object.entries(formEntries) + .map(([key, value]) => smithy_client_1.extendedEncodeURIComponent(key) + "=" + smithy_client_1.extendedEncodeURIComponent(value)) + .join("&"); +const loadQueryErrorCode = (output, data) => { + if (data.Error.Code !== undefined) { + return data.Error.Code; + } + if (output.statusCode == 404) { + return "NotFound"; + } + return ""; +}; + + +/***/ }), + +/***/ 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__(1121)); +const defaultStsRoleAssumers_1 = __nccwpck_require__(48); +const config_resolver_1 = __nccwpck_require__(6153); +const credential_provider_node_1 = __nccwpck_require__(5531); +const hash_node_1 = __nccwpck_require__(7442); +const middleware_retry_1 = __nccwpck_require__(6064); +const node_config_provider_1 = __nccwpck_require__(7684); +const node_http_handler_1 = __nccwpck_require__(8805); +const util_base64_node_1 = __nccwpck_require__(8588); +const util_body_length_node_1 = __nccwpck_require__(4147); +const util_user_agent_node_1 = __nccwpck_require__(8095); +const util_utf8_node_1 = __nccwpck_require__(6278); +const runtimeConfig_shared_1 = __nccwpck_require__(2642); +const smithy_client_1 = __nccwpck_require__(4963); +const getRuntimeConfig = (config) => { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q; + smithy_client_1.emitWarningIfUnsupportedVersion(process.version); + const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "node", + base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64, + base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64, + bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : defaultStsRoleAssumers_1.decorateDefaultCredentialProvider(credential_provider_node_1.defaultProvider), + defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : util_user_agent_node_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(), + retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig(middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS), + sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, "sha256"), + streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector, + useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), + utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : util_utf8_node_1.fromUtf8, + utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : util_utf8_node_1.toUtf8, + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; + + +/***/ }), + +/***/ 2642: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRuntimeConfig = void 0; +const url_parser_1 = __nccwpck_require__(2992); +const endpoints_1 = __nccwpck_require__(3571); +const getRuntimeConfig = (config) => { + var _a, _b, _c, _d, _e; + return ({ + apiVersion: "2011-06-15", + disableHostPrefix: (_a = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _a !== void 0 ? _a : false, + logger: (_b = config === null || config === void 0 ? void 0 : config.logger) !== null && _b !== void 0 ? _b : {}, + regionInfoProvider: (_c = config === null || config === void 0 ? void 0 : config.regionInfoProvider) !== null && _c !== void 0 ? _c : endpoints_1.defaultRegionInfoProvider, + serviceId: (_d = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _d !== void 0 ? _d : "STS", + urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : url_parser_1.parseUrl, + }); +}; +exports.getRuntimeConfig = getRuntimeConfig; + + +/***/ }), + +/***/ 4723: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = exports.DEFAULT_USE_DUALSTACK_ENDPOINT = exports.CONFIG_USE_DUALSTACK_ENDPOINT = exports.ENV_USE_DUALSTACK_ENDPOINT = void 0; +const util_config_provider_1 = __nccwpck_require__(6168); +exports.ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT"; +exports.CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint"; +exports.DEFAULT_USE_DUALSTACK_ENDPOINT = false; +exports.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => util_config_provider_1.booleanSelector(env, exports.ENV_USE_DUALSTACK_ENDPOINT, util_config_provider_1.SelectorType.ENV), + configFileSelector: (profile) => util_config_provider_1.booleanSelector(profile, exports.CONFIG_USE_DUALSTACK_ENDPOINT, util_config_provider_1.SelectorType.CONFIG), + default: false, +}; + + +/***/ }), + +/***/ 2478: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = exports.DEFAULT_USE_FIPS_ENDPOINT = exports.CONFIG_USE_FIPS_ENDPOINT = exports.ENV_USE_FIPS_ENDPOINT = void 0; +const util_config_provider_1 = __nccwpck_require__(6168); +exports.ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT"; +exports.CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint"; +exports.DEFAULT_USE_FIPS_ENDPOINT = false; +exports.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => util_config_provider_1.booleanSelector(env, exports.ENV_USE_FIPS_ENDPOINT, util_config_provider_1.SelectorType.ENV), + configFileSelector: (profile) => util_config_provider_1.booleanSelector(profile, exports.CONFIG_USE_FIPS_ENDPOINT, util_config_provider_1.SelectorType.CONFIG), + default: false, +}; + + +/***/ }), + +/***/ 7392: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(4723), exports); +tslib_1.__exportStar(__nccwpck_require__(2478), exports); +tslib_1.__exportStar(__nccwpck_require__(2108), exports); +tslib_1.__exportStar(__nccwpck_require__(2327), exports); + + +/***/ }), + +/***/ 2108: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveCustomEndpointsConfig = void 0; +const normalizeBoolean_1 = __nccwpck_require__(2164); +const normalizeEndpoint_1 = __nccwpck_require__(9815); +const resolveCustomEndpointsConfig = (input) => { + var _a; + return ({ + ...input, + tls: (_a = input.tls) !== null && _a !== void 0 ? _a : true, + endpoint: normalizeEndpoint_1.normalizeEndpoint(input), + isCustomEndpoint: true, + useDualstackEndpoint: normalizeBoolean_1.normalizeBoolean(input.useDualstackEndpoint), + }); +}; +exports.resolveCustomEndpointsConfig = resolveCustomEndpointsConfig; + + +/***/ }), + +/***/ 2327: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveEndpointsConfig = void 0; +const getEndpointFromRegion_1 = __nccwpck_require__(4159); +const normalizeBoolean_1 = __nccwpck_require__(2164); +const normalizeEndpoint_1 = __nccwpck_require__(9815); +const resolveEndpointsConfig = (input) => { + var _a; + const useDualstackEndpoint = normalizeBoolean_1.normalizeBoolean(input.useDualstackEndpoint); + const { endpoint, useFipsEndpoint } = input; + return { + ...input, + tls: (_a = input.tls) !== null && _a !== void 0 ? _a : true, + endpoint: endpoint + ? normalizeEndpoint_1.normalizeEndpoint({ ...input, endpoint }) + : () => getEndpointFromRegion_1.getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }), + isCustomEndpoint: endpoint ? true : false, + useDualstackEndpoint, + }; +}; +exports.resolveEndpointsConfig = resolveEndpointsConfig; + + +/***/ }), + +/***/ 4159: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getEndpointFromRegion = void 0; +const getEndpointFromRegion = async (input) => { + var _a; + 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 } = (_a = (await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }))) !== null && _a !== void 0 ? _a : {}; + if (!hostname) { + throw new Error("Cannot resolve hostname from client config"); + } + return input.urlParser(`${tls ? "https:" : "http:"}//${hostname}`); +}; +exports.getEndpointFromRegion = getEndpointFromRegion; + + +/***/ }), + +/***/ 2164: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.normalizeBoolean = void 0; +const normalizeBoolean = (value) => { + if (typeof value === "boolean") { + const promisified = Promise.resolve(value); + return () => promisified; + } + return value; +}; +exports.normalizeBoolean = normalizeBoolean; + + +/***/ }), + +/***/ 9815: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.normalizeEndpoint = void 0; +const normalizeEndpoint = ({ endpoint, urlParser }) => { + if (typeof endpoint === "string") { + const promisified = Promise.resolve(urlParser(endpoint)); + return () => promisified; + } + else if (typeof endpoint === "object") { + const promisified = Promise.resolve(endpoint); + return () => promisified; + } + return endpoint; +}; +exports.normalizeEndpoint = normalizeEndpoint; + + +/***/ }), + +/***/ 6153: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(7392), exports); +tslib_1.__exportStar(__nccwpck_require__(5441), exports); +tslib_1.__exportStar(__nccwpck_require__(6258), exports); + + +/***/ }), + +/***/ 422: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NODE_REGION_CONFIG_FILE_OPTIONS = exports.NODE_REGION_CONFIG_OPTIONS = exports.REGION_INI_NAME = exports.REGION_ENV_NAME = void 0; +exports.REGION_ENV_NAME = "AWS_REGION"; +exports.REGION_INI_NAME = "region"; +exports.NODE_REGION_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[exports.REGION_ENV_NAME], + configFileSelector: (profile) => profile[exports.REGION_INI_NAME], + default: () => { + throw new Error("Region is missing"); + }, +}; +exports.NODE_REGION_CONFIG_FILE_OPTIONS = { + preferredFile: "credentials", +}; + + +/***/ }), + +/***/ 2844: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRealRegion = void 0; +const isFipsRegion_1 = __nccwpck_require__(2440); +const getRealRegion = (region) => isFipsRegion_1.isFipsRegion(region) + ? ["fips-aws-global", "aws-fips"].includes(region) + ? "us-east-1" + : region.replace(/fips-(dkr-|prod-)?|-fips/, "") + : region; +exports.getRealRegion = getRealRegion; + + +/***/ }), + +/***/ 5441: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(422), exports); +tslib_1.__exportStar(__nccwpck_require__(1595), exports); + + +/***/ }), + +/***/ 2440: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isFipsRegion = void 0; +const isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")); +exports.isFipsRegion = isFipsRegion; + + +/***/ }), + +/***/ 1595: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveRegionConfig = void 0; +const getRealRegion_1 = __nccwpck_require__(2844); +const isFipsRegion_1 = __nccwpck_require__(2440); +const resolveRegionConfig = (input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); + } + return { + ...input, + region: async () => { + if (typeof region === "string") { + return getRealRegion_1.getRealRegion(region); + } + const providedRegion = await region(); + return getRealRegion_1.getRealRegion(providedRegion); + }, + useFipsEndpoint: async () => { + const providedRegion = typeof region === "string" ? region : await region(); + if (isFipsRegion_1.isFipsRegion(providedRegion)) { return true; } - } else { - return actual === expected; - } - }, - _getTypeName: function(obj) { - switch (Object.prototype.toString.call(obj)) { - case "[object String]": - return TYPE_STRING; - case "[object Number]": - return TYPE_NUMBER; - case "[object Array]": - return TYPE_ARRAY; - case "[object Boolean]": - return TYPE_BOOLEAN; - case "[object Null]": - return TYPE_NULL; - case "[object Object]": - // Check if it's an expref. If it has, it's been - // tagged with a jmespathType attr of 'Expref'; - if (obj.jmespathType === TOK_EXPREF) { - return TYPE_EXPREF; - } else { - return TYPE_OBJECT; - } - } - }, - - _functionStartsWith: function(resolvedArgs) { - return resolvedArgs[0].lastIndexOf(resolvedArgs[1]) === 0; - }, - - _functionEndsWith: function(resolvedArgs) { - var searchStr = resolvedArgs[0]; - var suffix = resolvedArgs[1]; - return searchStr.indexOf(suffix, searchStr.length - suffix.length) !== -1; - }, - - _functionReverse: function(resolvedArgs) { - var typeName = this._getTypeName(resolvedArgs[0]); - if (typeName === TYPE_STRING) { - var originalStr = resolvedArgs[0]; - var reversedStr = ""; - for (var i = originalStr.length - 1; i >= 0; i--) { - reversedStr += originalStr[i]; - } - return reversedStr; - } else { - var reversedArray = resolvedArgs[0].slice(0); - reversedArray.reverse(); - return reversedArray; - } - }, - - _functionAbs: function(resolvedArgs) { - return Math.abs(resolvedArgs[0]); - }, - - _functionCeil: function(resolvedArgs) { - return Math.ceil(resolvedArgs[0]); - }, - - _functionAvg: function(resolvedArgs) { - var sum = 0; - var inputArray = resolvedArgs[0]; - for (var i = 0; i < inputArray.length; i++) { - sum += inputArray[i]; - } - return sum / inputArray.length; - }, - - _functionContains: function(resolvedArgs) { - return resolvedArgs[0].indexOf(resolvedArgs[1]) >= 0; - }, - - _functionFloor: function(resolvedArgs) { - return Math.floor(resolvedArgs[0]); - }, - - _functionLength: function(resolvedArgs) { - if (!isObject(resolvedArgs[0])) { - return resolvedArgs[0].length; - } else { - // As far as I can tell, there's no way to get the length - // of an object without O(n) iteration through the object. - return Object.keys(resolvedArgs[0]).length; - } - }, - - _functionMap: function(resolvedArgs) { - var mapped = []; - var interpreter = this._interpreter; - var exprefNode = resolvedArgs[0]; - var elements = resolvedArgs[1]; - for (var i = 0; i < elements.length; i++) { - mapped.push(interpreter.visit(exprefNode, elements[i])); - } - return mapped; - }, - - _functionMerge: function(resolvedArgs) { - var merged = {}; - for (var i = 0; i < resolvedArgs.length; i++) { - var current = resolvedArgs[i]; - for (var key in current) { - merged[key] = current[key]; - } - } - return merged; - }, - - _functionMax: function(resolvedArgs) { - if (resolvedArgs[0].length > 0) { - var typeName = this._getTypeName(resolvedArgs[0][0]); - if (typeName === TYPE_NUMBER) { - return Math.max.apply(Math, resolvedArgs[0]); - } else { - var elements = resolvedArgs[0]; - var maxElement = elements[0]; - for (var i = 1; i < elements.length; i++) { - if (maxElement.localeCompare(elements[i]) < 0) { - maxElement = elements[i]; - } - } - return maxElement; - } - } else { - return null; - } - }, - - _functionMin: function(resolvedArgs) { - if (resolvedArgs[0].length > 0) { - var typeName = this._getTypeName(resolvedArgs[0][0]); - if (typeName === TYPE_NUMBER) { - return Math.min.apply(Math, resolvedArgs[0]); - } else { - var elements = resolvedArgs[0]; - var minElement = elements[0]; - for (var i = 1; i < elements.length; i++) { - if (elements[i].localeCompare(minElement) < 0) { - minElement = elements[i]; - } - } - return minElement; - } - } else { - return null; - } - }, - - _functionSum: function(resolvedArgs) { - var sum = 0; - var listToSum = resolvedArgs[0]; - for (var i = 0; i < listToSum.length; i++) { - sum += listToSum[i]; - } - return sum; - }, - - _functionType: function(resolvedArgs) { - switch (this._getTypeName(resolvedArgs[0])) { - case TYPE_NUMBER: - return "number"; - case TYPE_STRING: - return "string"; - case TYPE_ARRAY: - return "array"; - case TYPE_OBJECT: - return "object"; - case TYPE_BOOLEAN: - return "boolean"; - case TYPE_EXPREF: - return "expref"; - case TYPE_NULL: - return "null"; - } - }, - - _functionKeys: function(resolvedArgs) { - return Object.keys(resolvedArgs[0]); - }, - - _functionValues: function(resolvedArgs) { - var obj = resolvedArgs[0]; - var keys = Object.keys(obj); - var values = []; - for (var i = 0; i < keys.length; i++) { - values.push(obj[keys[i]]); - } - return values; - }, - - _functionJoin: function(resolvedArgs) { - var joinChar = resolvedArgs[0]; - var listJoin = resolvedArgs[1]; - return listJoin.join(joinChar); - }, - - _functionToArray: function(resolvedArgs) { - if (this._getTypeName(resolvedArgs[0]) === TYPE_ARRAY) { - return resolvedArgs[0]; - } else { - return [resolvedArgs[0]]; - } - }, - - _functionToString: function(resolvedArgs) { - if (this._getTypeName(resolvedArgs[0]) === TYPE_STRING) { - return resolvedArgs[0]; - } else { - return JSON.stringify(resolvedArgs[0]); - } - }, - - _functionToNumber: function(resolvedArgs) { - var typeName = this._getTypeName(resolvedArgs[0]); - var convertedValue; - if (typeName === TYPE_NUMBER) { - return resolvedArgs[0]; - } else if (typeName === TYPE_STRING) { - convertedValue = +resolvedArgs[0]; - if (!isNaN(convertedValue)) { - return convertedValue; - } - } - return null; - }, - - _functionNotNull: function(resolvedArgs) { - for (var i = 0; i < resolvedArgs.length; i++) { - if (this._getTypeName(resolvedArgs[i]) !== TYPE_NULL) { - return resolvedArgs[i]; - } - } - return null; - }, - - _functionSort: function(resolvedArgs) { - var sortedArray = resolvedArgs[0].slice(0); - sortedArray.sort(); - return sortedArray; - }, - - _functionSortBy: function(resolvedArgs) { - var sortedArray = resolvedArgs[0].slice(0); - if (sortedArray.length === 0) { - return sortedArray; - } - var interpreter = this._interpreter; - var exprefNode = resolvedArgs[1]; - var requiredType = this._getTypeName( - interpreter.visit(exprefNode, sortedArray[0])); - if ([TYPE_NUMBER, TYPE_STRING].indexOf(requiredType) < 0) { - throw new Error("TypeError"); - } - var that = this; - // In order to get a stable sort out of an unstable - // sort algorithm, we decorate/sort/undecorate (DSU) - // by creating a new list of [index, element] pairs. - // In the cmp function, if the evaluated elements are - // equal, then the index will be used as the tiebreaker. - // After the decorated list has been sorted, it will be - // undecorated to extract the original elements. - var decorated = []; - for (var i = 0; i < sortedArray.length; i++) { - decorated.push([i, sortedArray[i]]); - } - decorated.sort(function(a, b) { - var exprA = interpreter.visit(exprefNode, a[1]); - var exprB = interpreter.visit(exprefNode, b[1]); - if (that._getTypeName(exprA) !== requiredType) { - throw new Error( - "TypeError: expected " + requiredType + ", received " + - that._getTypeName(exprA)); - } else if (that._getTypeName(exprB) !== requiredType) { - throw new Error( - "TypeError: expected " + requiredType + ", received " + - that._getTypeName(exprB)); - } - if (exprA > exprB) { - return 1; - } else if (exprA < exprB) { - return -1; - } else { - // If they're equal compare the items by their - // order to maintain relative order of equal keys - // (i.e. to get a stable sort). - return a[0] - b[0]; - } - }); - // Undecorate: extract out the original list elements. - for (var j = 0; j < decorated.length; j++) { - sortedArray[j] = decorated[j][1]; - } - return sortedArray; - }, - - _functionMaxBy: function(resolvedArgs) { - var exprefNode = resolvedArgs[1]; - var resolvedArray = resolvedArgs[0]; - var keyFunction = this.createKeyFunction(exprefNode, [TYPE_NUMBER, TYPE_STRING]); - var maxNumber = -Infinity; - var maxRecord; - var current; - for (var i = 0; i < resolvedArray.length; i++) { - current = keyFunction(resolvedArray[i]); - if (current > maxNumber) { - maxNumber = current; - maxRecord = resolvedArray[i]; - } - } - return maxRecord; - }, - - _functionMinBy: function(resolvedArgs) { - var exprefNode = resolvedArgs[1]; - var resolvedArray = resolvedArgs[0]; - var keyFunction = this.createKeyFunction(exprefNode, [TYPE_NUMBER, TYPE_STRING]); - var minNumber = Infinity; - var minRecord; - var current; - for (var i = 0; i < resolvedArray.length; i++) { - current = keyFunction(resolvedArray[i]); - if (current < minNumber) { - minNumber = current; - minRecord = resolvedArray[i]; - } - } - return minRecord; - }, - - createKeyFunction: function(exprefNode, allowedTypes) { - var that = this; - var interpreter = this._interpreter; - var keyFunc = function(x) { - var current = interpreter.visit(exprefNode, x); - if (allowedTypes.indexOf(that._getTypeName(current)) < 0) { - var msg = "TypeError: expected one of " + allowedTypes + - ", received " + that._getTypeName(current); - throw new Error(msg); - } - return current; - }; - return keyFunc; - } - - }; - - function compile(stream) { - var parser = new Parser(); - var ast = parser.parse(stream); - return ast; - } - - function tokenize(stream) { - var lexer = new Lexer(); - return lexer.tokenize(stream); - } - - function search(data, expression) { - var parser = new Parser(); - // This needs to be improved. Both the interpreter and runtime depend on - // each other. The runtime needs the interpreter to support exprefs. - // There's likely a clean way to avoid the cyclic dependency. - var runtime = new Runtime(); - var interpreter = new TreeInterpreter(runtime); - runtime._interpreter = interpreter; - var node = parser.parse(expression); - return interpreter.search(node, data); - } - - exports.tokenize = tokenize; - exports.compile = compile; - exports.search = search; - exports.strictDeepEqual = strictDeepEqual; -})( false ? 0 : exports); + return typeof useFipsEndpoint === "boolean" ? Promise.resolve(useFipsEndpoint) : useFipsEndpoint(); + }, + }; +}; +exports.resolveRegionConfig = resolveRegionConfig; /***/ }), -/***/ 74294: +/***/ 3566: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); + + +/***/ }), + +/***/ 6057: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); + + +/***/ }), + +/***/ 5280: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getHostnameFromVariants = void 0; +const getHostnameFromVariants = (variants = [], { useFipsEndpoint, useDualstackEndpoint }) => { + var _a; + return (_a = variants.find(({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack"))) === null || _a === void 0 ? void 0 : _a.hostname; +}; +exports.getHostnameFromVariants = getHostnameFromVariants; + + +/***/ }), + +/***/ 6167: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRegionInfo = void 0; +const getHostnameFromVariants_1 = __nccwpck_require__(5280); +const getResolvedHostname_1 = __nccwpck_require__(3877); +const getResolvedPartition_1 = __nccwpck_require__(7642); +const getResolvedSigningRegion_1 = __nccwpck_require__(3517); +const getRegionInfo = (region, { useFipsEndpoint = false, useDualstackEndpoint = false, signingService, regionHash, partitionHash, }) => { + var _a, _b, _c, _d, _e, _f; + const partition = getResolvedPartition_1.getResolvedPartition(region, { partitionHash }); + const resolvedRegion = region in regionHash ? region : (_b = (_a = partitionHash[partition]) === null || _a === void 0 ? void 0 : _a.endpoint) !== null && _b !== void 0 ? _b : region; + const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint }; + const regionHostname = getHostnameFromVariants_1.getHostnameFromVariants((_c = regionHash[resolvedRegion]) === null || _c === void 0 ? void 0 : _c.variants, hostnameOptions); + const partitionHostname = getHostnameFromVariants_1.getHostnameFromVariants((_d = partitionHash[partition]) === null || _d === void 0 ? void 0 : _d.variants, hostnameOptions); + const hostname = getResolvedHostname_1.getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname }); + if (hostname === undefined) { + throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`); + } + const signingRegion = getResolvedSigningRegion_1.getResolvedSigningRegion(hostname, { + signingRegion: (_e = regionHash[resolvedRegion]) === null || _e === void 0 ? void 0 : _e.signingRegion, + regionRegex: partitionHash[partition].regionRegex, + useFipsEndpoint, + }); + return { + partition, + signingService, + hostname, + ...(signingRegion && { signingRegion }), + ...(((_f = regionHash[resolvedRegion]) === null || _f === void 0 ? void 0 : _f.signingService) && { + signingService: regionHash[resolvedRegion].signingService, + }), + }; +}; +exports.getRegionInfo = getRegionInfo; + + +/***/ }), + +/***/ 3877: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getResolvedHostname = void 0; +const getResolvedHostname = (resolvedRegion, { regionHostname, partitionHostname }) => regionHostname + ? regionHostname + : partitionHostname + ? partitionHostname.replace("{region}", resolvedRegion) + : undefined; +exports.getResolvedHostname = getResolvedHostname; + + +/***/ }), + +/***/ 7642: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getResolvedPartition = void 0; +const getResolvedPartition = (region, { partitionHash }) => { var _a; return (_a = Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region))) !== null && _a !== void 0 ? _a : "aws"; }; +exports.getResolvedPartition = getResolvedPartition; + + +/***/ }), + +/***/ 3517: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getResolvedSigningRegion = void 0; +const getResolvedSigningRegion = (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); + } + } +}; +exports.getResolvedSigningRegion = getResolvedSigningRegion; + + +/***/ }), + +/***/ 6258: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(3566), exports); +tslib_1.__exportStar(__nccwpck_require__(6057), exports); +tslib_1.__exportStar(__nccwpck_require__(6167), exports); + + +/***/ }), + +/***/ 5972: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromEnv = exports.ENV_EXPIRATION = exports.ENV_SESSION = exports.ENV_SECRET = exports.ENV_KEY = void 0; +const property_provider_1 = __nccwpck_require__(4462); +exports.ENV_KEY = "AWS_ACCESS_KEY_ID"; +exports.ENV_SECRET = "AWS_SECRET_ACCESS_KEY"; +exports.ENV_SESSION = "AWS_SESSION_TOKEN"; +exports.ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; +function fromEnv() { + return () => { + const accessKeyId = process.env[exports.ENV_KEY]; + const secretAccessKey = process.env[exports.ENV_SECRET]; + const expiry = process.env[exports.ENV_EXPIRATION]; + if (accessKeyId && secretAccessKey) { + return Promise.resolve({ + accessKeyId, + secretAccessKey, + sessionToken: process.env[exports.ENV_SESSION], + expiration: expiry ? new Date(expiry) : undefined, + }); + } + return Promise.reject(new property_provider_1.CredentialsProviderError("Unable to find environment variable credentials.")); + }; +} +exports.fromEnv = fromEnv; + + +/***/ }), + +/***/ 3736: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Endpoint = void 0; +var Endpoint; +(function (Endpoint) { + Endpoint["IPv4"] = "http://169.254.169.254"; + Endpoint["IPv6"] = "http://[fd00:ec2::254]"; +})(Endpoint = exports.Endpoint || (exports.Endpoint = {})); + + +/***/ }), + +/***/ 8438: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ENDPOINT_CONFIG_OPTIONS = exports.CONFIG_ENDPOINT_NAME = exports.ENV_ENDPOINT_NAME = void 0; +exports.ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT"; +exports.CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint"; +exports.ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[exports.ENV_ENDPOINT_NAME], + configFileSelector: (profile) => profile[exports.CONFIG_ENDPOINT_NAME], + default: undefined, +}; + + +/***/ }), + +/***/ 1695: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.EndpointMode = void 0; +var EndpointMode; +(function (EndpointMode) { + EndpointMode["IPv4"] = "IPv4"; + EndpointMode["IPv6"] = "IPv6"; +})(EndpointMode = exports.EndpointMode || (exports.EndpointMode = {})); + + +/***/ }), + +/***/ 7824: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ENDPOINT_MODE_CONFIG_OPTIONS = exports.CONFIG_ENDPOINT_MODE_NAME = exports.ENV_ENDPOINT_MODE_NAME = void 0; +const EndpointMode_1 = __nccwpck_require__(1695); +exports.ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"; +exports.CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode"; +exports.ENDPOINT_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[exports.ENV_ENDPOINT_MODE_NAME], + configFileSelector: (profile) => profile[exports.CONFIG_ENDPOINT_MODE_NAME], + default: EndpointMode_1.EndpointMode.IPv4, +}; + + +/***/ }), + +/***/ 5232: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromContainerMetadata = exports.ENV_CMDS_AUTH_TOKEN = exports.ENV_CMDS_RELATIVE_URI = exports.ENV_CMDS_FULL_URI = void 0; +const property_provider_1 = __nccwpck_require__(4462); +const url_1 = __nccwpck_require__(8835); +const httpRequest_1 = __nccwpck_require__(1303); +const ImdsCredentials_1 = __nccwpck_require__(1467); +const RemoteProviderInit_1 = __nccwpck_require__(2314); +const retry_1 = __nccwpck_require__(9912); +exports.ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; +exports.ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; +exports.ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; +const fromContainerMetadata = (init = {}) => { + const { timeout, maxRetries } = RemoteProviderInit_1.providerConfigFromInit(init); + return () => retry_1.retry(async () => { + const requestOptions = await getCmdsUri(); + const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions)); + if (!ImdsCredentials_1.isImdsCredentials(credsResponse)) { + throw new property_provider_1.CredentialsProviderError("Invalid response received from instance metadata service."); + } + return ImdsCredentials_1.fromImdsCredentials(credsResponse); + }, maxRetries); +}; +exports.fromContainerMetadata = fromContainerMetadata; +const requestFromEcsImds = async (timeout, options) => { + if (process.env[exports.ENV_CMDS_AUTH_TOKEN]) { + options.headers = { + ...options.headers, + Authorization: process.env[exports.ENV_CMDS_AUTH_TOKEN], + }; + } + const buffer = await httpRequest_1.httpRequest({ + ...options, + timeout, + }); + return buffer.toString(); +}; +const CMDS_IP = "169.254.170.2"; +const GREENGRASS_HOSTS = { + localhost: true, + "127.0.0.1": true, +}; +const GREENGRASS_PROTOCOLS = { + "http:": true, + "https:": true, +}; +const getCmdsUri = async () => { + if (process.env[exports.ENV_CMDS_RELATIVE_URI]) { + return { + hostname: CMDS_IP, + path: process.env[exports.ENV_CMDS_RELATIVE_URI], + }; + } + if (process.env[exports.ENV_CMDS_FULL_URI]) { + const parsed = url_1.parse(process.env[exports.ENV_CMDS_FULL_URI]); + if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) { + throw new property_provider_1.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, false); + } + if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) { + throw new property_provider_1.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, false); + } + return { + ...parsed, + port: parsed.port ? parseInt(parsed.port, 10) : undefined, + }; + } + throw new property_provider_1.CredentialsProviderError("The container metadata credential provider cannot be used unless" + + ` the ${exports.ENV_CMDS_RELATIVE_URI} or ${exports.ENV_CMDS_FULL_URI} environment` + + " variable is set", false); +}; + + +/***/ }), + +/***/ 5813: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromInstanceMetadata = void 0; +const property_provider_1 = __nccwpck_require__(4462); +const httpRequest_1 = __nccwpck_require__(1303); +const ImdsCredentials_1 = __nccwpck_require__(1467); +const RemoteProviderInit_1 = __nccwpck_require__(2314); +const retry_1 = __nccwpck_require__(9912); +const getInstanceMetadataEndpoint_1 = __nccwpck_require__(1206); +const IMDS_PATH = "/latest/meta-data/iam/security-credentials/"; +const IMDS_TOKEN_PATH = "/latest/api/token"; +const fromInstanceMetadata = (init = {}) => { + let disableFetchToken = false; + const { timeout, maxRetries } = RemoteProviderInit_1.providerConfigFromInit(init); + const getCredentials = async (maxRetries, options) => { + const profile = (await retry_1.retry(async () => { + let profile; + try { + profile = await getProfile(options); + } + catch (err) { + if (err.statusCode === 401) { + disableFetchToken = false; + } + throw err; + } + return profile; + }, maxRetries)).trim(); + return retry_1.retry(async () => { + let creds; + try { + creds = await getCredentialsFromProfile(profile, options); + } + catch (err) { + if (err.statusCode === 401) { + disableFetchToken = false; + } + throw err; + } + return creds; + }, maxRetries); + }; + return async () => { + const endpoint = await getInstanceMetadataEndpoint_1.getInstanceMetadataEndpoint(); + if (disableFetchToken) { + return getCredentials(maxRetries, { ...endpoint, timeout }); + } + else { + let token; + try { + token = (await getMetadataToken({ ...endpoint, timeout })).toString(); + } + catch (error) { + if ((error === null || error === void 0 ? 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 getCredentials(maxRetries, { ...endpoint, timeout }); + } + return getCredentials(maxRetries, { + ...endpoint, + headers: { + "x-aws-ec2-metadata-token": token, + }, + timeout, + }); + } + }; +}; +exports.fromInstanceMetadata = fromInstanceMetadata; +const getMetadataToken = async (options) => httpRequest_1.httpRequest({ + ...options, + path: IMDS_TOKEN_PATH, + method: "PUT", + headers: { + "x-aws-ec2-metadata-token-ttl-seconds": "21600", + }, +}); +const getProfile = async (options) => (await httpRequest_1.httpRequest({ ...options, path: IMDS_PATH })).toString(); +const getCredentialsFromProfile = async (profile, options) => { + const credsResponse = JSON.parse((await httpRequest_1.httpRequest({ + ...options, + path: IMDS_PATH + profile, + })).toString()); + if (!ImdsCredentials_1.isImdsCredentials(credsResponse)) { + throw new property_provider_1.CredentialsProviderError("Invalid response received from instance metadata service."); + } + return ImdsCredentials_1.fromImdsCredentials(credsResponse); +}; + + +/***/ }), + +/***/ 5898: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(5232), exports); +tslib_1.__exportStar(__nccwpck_require__(5813), exports); +tslib_1.__exportStar(__nccwpck_require__(2314), exports); + + +/***/ }), + +/***/ 1467: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromImdsCredentials = exports.isImdsCredentials = void 0; +const isImdsCredentials = (arg) => Boolean(arg) && + typeof arg === "object" && + typeof arg.AccessKeyId === "string" && + typeof arg.SecretAccessKey === "string" && + typeof arg.Token === "string" && + typeof arg.Expiration === "string"; +exports.isImdsCredentials = isImdsCredentials; +const fromImdsCredentials = (creds) => ({ + accessKeyId: creds.AccessKeyId, + secretAccessKey: creds.SecretAccessKey, + sessionToken: creds.Token, + expiration: new Date(creds.Expiration), +}); +exports.fromImdsCredentials = fromImdsCredentials; + + +/***/ }), + +/***/ 2314: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.providerConfigFromInit = exports.DEFAULT_MAX_RETRIES = exports.DEFAULT_TIMEOUT = void 0; +exports.DEFAULT_TIMEOUT = 1000; +exports.DEFAULT_MAX_RETRIES = 0; +const providerConfigFromInit = ({ maxRetries = exports.DEFAULT_MAX_RETRIES, timeout = exports.DEFAULT_TIMEOUT, }) => ({ maxRetries, timeout }); +exports.providerConfigFromInit = providerConfigFromInit; + + +/***/ }), + +/***/ 1303: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.httpRequest = void 0; +const property_provider_1 = __nccwpck_require__(4462); +const buffer_1 = __nccwpck_require__(4293); +const http_1 = __nccwpck_require__(8605); +function httpRequest(options) { + return new Promise((resolve, reject) => { + var _a; + const req = http_1.request({ + method: "GET", + ...options, + hostname: (_a = options.hostname) === null || _a === void 0 ? void 0 : _a.replace(/^\[(.+)\]$/, "$1"), + }); + req.on("error", (err) => { + reject(Object.assign(new property_provider_1.ProviderError("Unable to connect to instance metadata service"), err)); + req.destroy(); + }); + req.on("timeout", () => { + reject(new property_provider_1.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 property_provider_1.ProviderError("Error response received from instance metadata service"), { statusCode })); + req.destroy(); + } + const chunks = []; + res.on("data", (chunk) => { + chunks.push(chunk); + }); + res.on("end", () => { + resolve(buffer_1.Buffer.concat(chunks)); + req.destroy(); + }); + }); + req.end(); + }); +} +exports.httpRequest = httpRequest; + + +/***/ }), + +/***/ 9912: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.retry = void 0; +const retry = (toRetry, maxRetries) => { + let promise = toRetry(); + for (let i = 0; i < maxRetries; i++) { + promise = promise.catch(toRetry); + } + return promise; +}; +exports.retry = retry; + + +/***/ }), + +/***/ 1206: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getInstanceMetadataEndpoint = void 0; +const node_config_provider_1 = __nccwpck_require__(7684); +const url_parser_1 = __nccwpck_require__(2992); +const Endpoint_1 = __nccwpck_require__(3736); +const EndpointConfigOptions_1 = __nccwpck_require__(8438); +const EndpointMode_1 = __nccwpck_require__(1695); +const EndpointModeConfigOptions_1 = __nccwpck_require__(7824); +const getInstanceMetadataEndpoint = async () => url_parser_1.parseUrl((await getFromEndpointConfig()) || (await getFromEndpointModeConfig())); +exports.getInstanceMetadataEndpoint = getInstanceMetadataEndpoint; +const getFromEndpointConfig = async () => node_config_provider_1.loadConfig(EndpointConfigOptions_1.ENDPOINT_CONFIG_OPTIONS)(); +const getFromEndpointModeConfig = async () => { + const endpointMode = await node_config_provider_1.loadConfig(EndpointModeConfigOptions_1.ENDPOINT_MODE_CONFIG_OPTIONS)(); + switch (endpointMode) { + case EndpointMode_1.EndpointMode.IPv4: + return Endpoint_1.Endpoint.IPv4; + case EndpointMode_1.EndpointMode.IPv6: + return Endpoint_1.Endpoint.IPv6; + default: + throw new Error(`Unsupported endpoint mode: ${endpointMode}.` + ` Select from ${Object.values(EndpointMode_1.EndpointMode)}`); + } +}; + + +/***/ }), + +/***/ 4203: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromIni = void 0; +const credential_provider_env_1 = __nccwpck_require__(5972); +const credential_provider_imds_1 = __nccwpck_require__(5898); +const credential_provider_sso_1 = __nccwpck_require__(6414); +const credential_provider_web_identity_1 = __nccwpck_require__(5646); +const property_provider_1 = __nccwpck_require__(4462); +const util_credentials_1 = __nccwpck_require__(8598); +const isStaticCredsProfile = (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; +const isWebIdentityProfile = (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; +const isAssumeRoleProfile = (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; +const isAssumeRoleWithSourceProfile = (arg) => isAssumeRoleProfile(arg) && typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined"; +const isAssumeRoleWithProviderProfile = (arg) => isAssumeRoleProfile(arg) && typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined"; +const fromIni = (init = {}) => async () => { + const profiles = await util_credentials_1.parseKnownFiles(init); + return resolveProfileData(util_credentials_1.getMasterProfileName(init), profiles, init); +}; +exports.fromIni = fromIni; +const resolveProfileData = async (profileName, profiles, options, visitedProfiles = {}) => { + const data = profiles[profileName]; + if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) { + return resolveStaticCredentials(data); + } + if (isAssumeRoleWithSourceProfile(data) || isAssumeRoleWithProviderProfile(data)) { + const { external_id: ExternalId, mfa_serial, role_arn: RoleArn, role_session_name: RoleSessionName = "aws-sdk-js-" + Date.now(), source_profile, credential_source, } = data; + if (!options.roleAssumer) { + throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} requires a role to be assumed, but no` + ` role assumption callback was provided.`, false); + } + if (source_profile && source_profile in visitedProfiles) { + throw new property_provider_1.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile` + + ` ${util_credentials_1.getMasterProfileName(options)}. Profiles visited: ` + + Object.keys(visitedProfiles).join(", "), false); + } + const sourceCreds = source_profile + ? resolveProfileData(source_profile, profiles, options, { + ...visitedProfiles, + [source_profile]: true, + }) + : resolveCredentialSource(credential_source, profileName)(); + const params = { RoleArn, RoleSessionName, ExternalId }; + if (mfa_serial) { + if (!options.mfaCodeProvider) { + throw new property_provider_1.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); + } + return options.roleAssumer(await sourceCreds, params); + } + if (isStaticCredsProfile(data)) { + return resolveStaticCredentials(data); + } + if (isWebIdentityProfile(data)) { + return resolveWebIdentityCredentials(data, options); + } + if (credential_provider_sso_1.isSsoProfile(data)) { + const { sso_start_url, sso_account_id, sso_region, sso_role_name } = credential_provider_sso_1.validateSsoProfile(data); + return credential_provider_sso_1.fromSSO({ + ssoStartUrl: sso_start_url, + ssoAccountId: sso_account_id, + ssoRegion: sso_region, + ssoRoleName: sso_role_name, + })(); + } + throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} could not be found or parsed in shared` + ` credentials file.`); +}; +const resolveCredentialSource = (credentialSource, profileName) => { + const sourceProvidersMap = { + EcsContainer: credential_provider_imds_1.fromContainerMetadata, + Ec2InstanceMetadata: credential_provider_imds_1.fromInstanceMetadata, + Environment: credential_provider_env_1.fromEnv, + }; + if (credentialSource in sourceProvidersMap) { + return sourceProvidersMap[credentialSource](); + } + else { + throw new property_provider_1.CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, ` + + `expected EcsContainer or Ec2InstanceMetadata or Environment.`); + } +}; +const resolveStaticCredentials = (profile) => Promise.resolve({ + accessKeyId: profile.aws_access_key_id, + secretAccessKey: profile.aws_secret_access_key, + sessionToken: profile.aws_session_token, +}); +const resolveWebIdentityCredentials = async (profile, options) => credential_provider_web_identity_1.fromTokenFile({ + webIdentityTokenFile: profile.web_identity_token_file, + roleArn: profile.role_arn, + roleSessionName: profile.role_session_name, + roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity, +})(); + + +/***/ }), + +/***/ 5531: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultProvider = exports.ENV_IMDS_DISABLED = void 0; +const credential_provider_env_1 = __nccwpck_require__(5972); +const credential_provider_imds_1 = __nccwpck_require__(5898); +const credential_provider_ini_1 = __nccwpck_require__(4203); +const credential_provider_process_1 = __nccwpck_require__(9969); +const credential_provider_sso_1 = __nccwpck_require__(6414); +const credential_provider_web_identity_1 = __nccwpck_require__(5646); +const property_provider_1 = __nccwpck_require__(4462); +const shared_ini_file_loader_1 = __nccwpck_require__(7387); +const util_credentials_1 = __nccwpck_require__(8598); +exports.ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; +const defaultProvider = (init = {}) => { + const options = { profile: process.env[util_credentials_1.ENV_PROFILE], ...init }; + if (!options.loadedConfig) + options.loadedConfig = shared_ini_file_loader_1.loadSharedConfigFiles(init); + const providers = [ + credential_provider_sso_1.fromSSO(options), + credential_provider_ini_1.fromIni(options), + credential_provider_process_1.fromProcess(options), + credential_provider_web_identity_1.fromTokenFile(options), + remoteProvider(options), + async () => { + throw new property_provider_1.CredentialsProviderError("Could not load credentials from any providers", false); + }, + ]; + if (!options.profile) + providers.unshift(credential_provider_env_1.fromEnv()); + const providerChain = property_provider_1.chain(...providers); + return property_provider_1.memoize(providerChain, (credentials) => credentials.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000, (credentials) => credentials.expiration !== undefined); +}; +exports.defaultProvider = defaultProvider; +const remoteProvider = (init) => { + if (process.env[credential_provider_imds_1.ENV_CMDS_RELATIVE_URI] || process.env[credential_provider_imds_1.ENV_CMDS_FULL_URI]) { + return credential_provider_imds_1.fromContainerMetadata(init); + } + if (process.env[exports.ENV_IMDS_DISABLED]) { + return () => Promise.reject(new property_provider_1.CredentialsProviderError("EC2 Instance Metadata Service access disabled")); + } + return credential_provider_imds_1.fromInstanceMetadata(init); +}; + + +/***/ }), + +/***/ 9969: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromProcess = exports.ENV_PROFILE = void 0; +const property_provider_1 = __nccwpck_require__(4462); +const util_credentials_1 = __nccwpck_require__(8598); +const child_process_1 = __nccwpck_require__(3129); +exports.ENV_PROFILE = "AWS_PROFILE"; +const fromProcess = (init = {}) => async () => { + const profiles = await util_credentials_1.parseKnownFiles(init); + return resolveProcessCredentials(util_credentials_1.getMasterProfileName(init), profiles); +}; +exports.fromProcess = fromProcess; +const resolveProcessCredentials = async (profileName, profiles) => { + const profile = profiles[profileName]; + if (profiles[profileName]) { + const credentialProcess = profile["credential_process"]; + if (credentialProcess !== undefined) { + return await execPromise(credentialProcess) + .then((processResult) => { + let data; + try { + data = JSON.parse(processResult); + } + catch (_a) { + throw Error(`Profile ${profileName} credential_process returned invalid JSON.`); + } + const { Version: version, AccessKeyId: accessKeyId, SecretAccessKey: secretAccessKey, SessionToken: sessionToken, Expiration: expiration, } = data; + if (version !== 1) { + throw Error(`Profile ${profileName} credential_process did not return Version 1.`); + } + if (accessKeyId === undefined || secretAccessKey === undefined) { + throw Error(`Profile ${profileName} credential_process returned invalid credentials.`); + } + let expirationUnix; + if (expiration) { + const currentTime = new Date(); + const expireTime = new Date(expiration); + if (expireTime < currentTime) { + throw Error(`Profile ${profileName} credential_process returned expired credentials.`); + } + expirationUnix = Math.floor(new Date(expiration).valueOf() / 1000); + } + return { + accessKeyId, + secretAccessKey, + sessionToken, + expirationUnix, + }; + }) + .catch((error) => { + throw new property_provider_1.CredentialsProviderError(error.message); + }); + } + else { + throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`); + } + } + else { + throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`); + } +}; +const execPromise = (command) => new Promise(function (resolve, reject) { + child_process_1.exec(command, (error, stdout) => { + if (error) { + reject(error); + return; + } + resolve(stdout.trim()); + }); +}); + + +/***/ }), + +/***/ 6414: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isSsoProfile = exports.validateSsoProfile = exports.fromSSO = exports.EXPIRE_WINDOW_MS = void 0; +const client_sso_1 = __nccwpck_require__(2666); +const property_provider_1 = __nccwpck_require__(4462); +const shared_ini_file_loader_1 = __nccwpck_require__(7387); +const util_credentials_1 = __nccwpck_require__(8598); +const crypto_1 = __nccwpck_require__(6417); +const fs_1 = __nccwpck_require__(5747); +const path_1 = __nccwpck_require__(5622); +exports.EXPIRE_WINDOW_MS = 15 * 60 * 1000; +const SHOULD_FAIL_CREDENTIAL_CHAIN = false; +const fromSSO = (init = {}) => async () => { + const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoClient } = init; + if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName) { + const profiles = await util_credentials_1.parseKnownFiles(init); + const profileName = util_credentials_1.getMasterProfileName(init); + const profile = profiles[profileName]; + if (!exports.isSsoProfile(profile)) { + throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`); + } + const { sso_start_url, sso_account_id, sso_region, sso_role_name } = exports.validateSsoProfile(profile); + return resolveSSOCredentials({ + ssoStartUrl: sso_start_url, + ssoAccountId: sso_account_id, + ssoRegion: sso_region, + ssoRoleName: sso_role_name, + ssoClient: ssoClient, + }); + } + else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) { + throw new property_provider_1.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl",' + + ' "ssoAccountId", "ssoRegion", "ssoRoleName"'); + } + else { + return resolveSSOCredentials({ ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoClient }); + } +}; +exports.fromSSO = fromSSO; +const resolveSSOCredentials = async ({ ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, }) => { + const hasher = crypto_1.createHash("sha1"); + const cacheName = hasher.update(ssoStartUrl).digest("hex"); + const tokenFile = path_1.join(shared_ini_file_loader_1.getHomeDir(), ".aws", "sso", "cache", `${cacheName}.json`); + let token; + try { + token = JSON.parse(fs_1.readFileSync(tokenFile, { encoding: "utf-8" })); + if (new Date(token.expiresAt).getTime() - Date.now() <= exports.EXPIRE_WINDOW_MS) { + throw new Error("SSO token is expired."); + } + } + catch (e) { + throw new property_provider_1.CredentialsProviderError(`The SSO session associated with this profile has expired or is otherwise invalid. To refresh this SSO session ` + + `run aws sso login with the corresponding profile.`, SHOULD_FAIL_CREDENTIAL_CHAIN); + } + const { accessToken } = token; + const sso = ssoClient || new client_sso_1.SSOClient({ region: ssoRegion }); + let ssoResp; + try { + ssoResp = await sso.send(new client_sso_1.GetRoleCredentialsCommand({ + accountId: ssoAccountId, + roleName: ssoRoleName, + accessToken, + })); + } + catch (e) { + throw property_provider_1.CredentialsProviderError.from(e, SHOULD_FAIL_CREDENTIAL_CHAIN); + } + const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration } = {} } = ssoResp; + if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) { + throw new property_provider_1.CredentialsProviderError("SSO returns an invalid temporary credential.", SHOULD_FAIL_CREDENTIAL_CHAIN); + } + return { accessKeyId, secretAccessKey, sessionToken, expiration: new Date(expiration) }; +}; +const validateSsoProfile = (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 property_provider_1.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(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, SHOULD_FAIL_CREDENTIAL_CHAIN); + } + return profile; +}; +exports.validateSsoProfile = validateSsoProfile; +const isSsoProfile = (arg) => arg && + (typeof arg.sso_start_url === "string" || + typeof arg.sso_account_id === "string" || + typeof arg.sso_region === "string" || + typeof arg.sso_role_name === "string"); +exports.isSsoProfile = isSsoProfile; + + +/***/ }), + +/***/ 5614: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromTokenFile = void 0; +const property_provider_1 = __nccwpck_require__(4462); +const fs_1 = __nccwpck_require__(5747); +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 () => { + return resolveTokenFile(init); +}; +exports.fromTokenFile = fromTokenFile; +const resolveTokenFile = (init) => { + var _a, _b, _c; + const webIdentityTokenFile = (_a = init === null || init === void 0 ? void 0 : init.webIdentityTokenFile) !== null && _a !== void 0 ? _a : process.env[ENV_TOKEN_FILE]; + const roleArn = (_b = init === null || init === void 0 ? void 0 : init.roleArn) !== null && _b !== void 0 ? _b : process.env[ENV_ROLE_ARN]; + const roleSessionName = (_c = init === null || init === void 0 ? void 0 : init.roleSessionName) !== null && _c !== void 0 ? _c : process.env[ENV_ROLE_SESSION_NAME]; + if (!webIdentityTokenFile || !roleArn) { + throw new property_provider_1.CredentialsProviderError("Web identity configuration not specified"); + } + return fromWebToken_1.fromWebToken({ + ...init, + webIdentityToken: fs_1.readFileSync(webIdentityTokenFile, { encoding: "ascii" }), + roleArn, + roleSessionName, + })(); +}; + + +/***/ }), + +/***/ 7905: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromWebToken = void 0; +const property_provider_1 = __nccwpck_require__(4462); +const fromWebToken = (init) => () => { + const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds, roleAssumerWithWebIdentity, } = init; + if (!roleAssumerWithWebIdentity) { + throw new property_provider_1.CredentialsProviderError(`Role Arn '${roleArn}' needs to be assumed with web identity,` + + ` but no role assumption callback was provided.`, false); + } + 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; + + +/***/ }), + +/***/ 5646: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(5614), exports); +tslib_1.__exportStar(__nccwpck_require__(7905), exports); + + +/***/ }), + +/***/ 7442: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Hash = void 0; +const util_buffer_from_1 = __nccwpck_require__(6010); +const buffer_1 = __nccwpck_require__(4293); +const crypto_1 = __nccwpck_require__(6417); +class Hash { + constructor(algorithmIdentifier, secret) { + this.hash = secret ? crypto_1.createHmac(algorithmIdentifier, castSourceData(secret)) : crypto_1.createHash(algorithmIdentifier); + } + update(toHash, encoding) { + this.hash.update(castSourceData(toHash, encoding)); + } + digest() { + return Promise.resolve(this.hash.digest()); + } +} +exports.Hash = Hash; +function castSourceData(toCast, encoding) { + if (buffer_1.Buffer.isBuffer(toCast)) { + return toCast; + } + if (typeof toCast === "string") { + return util_buffer_from_1.fromString(toCast, encoding); + } + if (ArrayBuffer.isView(toCast)) { + return util_buffer_from_1.fromArrayBuffer(toCast.buffer, toCast.byteOffset, toCast.byteLength); + } + return util_buffer_from_1.fromArrayBuffer(toCast); +} + + +/***/ }), + +/***/ 9126: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isArrayBuffer = void 0; +const isArrayBuffer = (arg) => (typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer) || + Object.prototype.toString.call(arg) === "[object ArrayBuffer]"; +exports.isArrayBuffer = isArrayBuffer; + + +/***/ }), + +/***/ 2245: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getContentLengthPlugin = exports.contentLengthMiddlewareOptions = exports.contentLengthMiddleware = void 0; +const protocol_http_1 = __nccwpck_require__(223); +const CONTENT_LENGTH_HEADER = "content-length"; +function contentLengthMiddleware(bodyLengthChecker) { + return (next) => async (args) => { + const request = args.request; + if (protocol_http_1.HttpRequest.isInstance(request)) { + const { body, headers } = request; + if (body && + Object.keys(headers) + .map((str) => str.toLowerCase()) + .indexOf(CONTENT_LENGTH_HEADER) === -1) { + const length = bodyLengthChecker(body); + if (length !== undefined) { + request.headers = { + ...request.headers, + [CONTENT_LENGTH_HEADER]: String(length), + }; + } + } + } + return next({ + ...args, + request, + }); + }; +} +exports.contentLengthMiddleware = contentLengthMiddleware; +exports.contentLengthMiddlewareOptions = { + step: "build", + tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"], + name: "contentLengthMiddleware", + override: true, +}; +const getContentLengthPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), exports.contentLengthMiddlewareOptions); + }, +}); +exports.getContentLengthPlugin = getContentLengthPlugin; + + +/***/ }), + +/***/ 2545: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getHostHeaderPlugin = exports.hostHeaderMiddlewareOptions = exports.hostHeaderMiddleware = exports.resolveHostHeaderConfig = void 0; +const protocol_http_1 = __nccwpck_require__(223); +function resolveHostHeaderConfig(input) { + return input; +} +exports.resolveHostHeaderConfig = resolveHostHeaderConfig; +const hostHeaderMiddleware = (options) => (next) => async (args) => { + if (!protocol_http_1.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"] = ""; + } + else if (!request.headers["host"]) { + request.headers["host"] = request.hostname; + } + return next(args); +}; +exports.hostHeaderMiddleware = hostHeaderMiddleware; +exports.hostHeaderMiddlewareOptions = { + name: "hostHeaderMiddleware", + step: "build", + priority: "low", + tags: ["HOST"], + override: true, +}; +const getHostHeaderPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(exports.hostHeaderMiddleware(options), exports.hostHeaderMiddlewareOptions); + }, +}); +exports.getHostHeaderPlugin = getHostHeaderPlugin; + + +/***/ }), + +/***/ 14: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(9754), exports); + + +/***/ }), + +/***/ 9754: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getLoggerPlugin = exports.loggerMiddlewareOptions = exports.loggerMiddleware = void 0; +const loggerMiddleware = () => (next, context) => async (args) => { + const { clientName, commandName, inputFilterSensitiveLog, logger, outputFilterSensitiveLog } = context; + const response = await next(args); + if (!logger) { + return response; + } + if (typeof logger.info === "function") { + const { $metadata, ...outputWithoutMetadata } = response.output; + logger.info({ + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + output: outputFilterSensitiveLog(outputWithoutMetadata), + metadata: $metadata, + }); + } + return response; +}; +exports.loggerMiddleware = loggerMiddleware; +exports.loggerMiddlewareOptions = { + name: "loggerMiddleware", + tags: ["LOGGER"], + step: "initialize", + override: true, +}; +const getLoggerPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(exports.loggerMiddleware(), exports.loggerMiddlewareOptions); + }, +}); +exports.getLoggerPlugin = getLoggerPlugin; + + +/***/ }), + +/***/ 7328: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdaptiveRetryStrategy = void 0; +const config_1 = __nccwpck_require__(5192); +const DefaultRateLimiter_1 = __nccwpck_require__(6402); +const StandardRetryStrategy_1 = __nccwpck_require__(533); +class AdaptiveRetryStrategy extends StandardRetryStrategy_1.StandardRetryStrategy { + constructor(maxAttemptsProvider, options) { + const { rateLimiter, ...superOptions } = options !== null && options !== void 0 ? options : {}; + super(maxAttemptsProvider, superOptions); + this.rateLimiter = rateLimiter !== null && rateLimiter !== void 0 ? rateLimiter : new DefaultRateLimiter_1.DefaultRateLimiter(); + this.mode = config_1.RETRY_MODES.ADAPTIVE; + } + async retry(next, args) { + return super.retry(next, args, { + beforeRequest: async () => { + return this.rateLimiter.getSendToken(); + }, + afterRequest: (response) => { + this.rateLimiter.updateClientSendingRate(response); + }, + }); + } +} +exports.AdaptiveRetryStrategy = AdaptiveRetryStrategy; + + +/***/ }), + +/***/ 6402: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DefaultRateLimiter = void 0; +const service_error_classification_1 = __nccwpck_require__(1921); +class DefaultRateLimiter { + constructor(options) { + var _a, _b, _c, _d, _e; + this.currentCapacity = 0; + this.enabled = false; + this.lastMaxRate = 0; + this.measuredTxRate = 0; + this.requestCount = 0; + this.lastTimestamp = 0; + this.timeWindow = 0; + this.beta = (_a = options === null || options === void 0 ? void 0 : options.beta) !== null && _a !== void 0 ? _a : 0.7; + this.minCapacity = (_b = options === null || options === void 0 ? void 0 : options.minCapacity) !== null && _b !== void 0 ? _b : 1; + this.minFillRate = (_c = options === null || options === void 0 ? void 0 : options.minFillRate) !== null && _c !== void 0 ? _c : 0.5; + this.scaleConstant = (_d = options === null || options === void 0 ? void 0 : options.scaleConstant) !== null && _d !== void 0 ? _d : 0.4; + this.smooth = (_e = options === null || options === void 0 ? void 0 : options.smooth) !== null && _e !== void 0 ? _e : 0.8; + const currentTimeInSeconds = this.getCurrentTimeInSeconds(); + this.lastThrottleTime = currentTimeInSeconds; + this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds()); + this.fillRate = this.minFillRate; + this.maxCapacity = this.minCapacity; + } + getCurrentTimeInSeconds() { + return Date.now() / 1000; + } + async getSendToken() { + return this.acquireTokenBucket(1); + } + async acquireTokenBucket(amount) { + if (!this.enabled) { + return; + } + this.refillTokenBucket(); + if (amount > this.currentCapacity) { + const delay = ((amount - this.currentCapacity) / this.fillRate) * 1000; + await new Promise((resolve) => setTimeout(resolve, delay)); + } + this.currentCapacity = this.currentCapacity - amount; + } + refillTokenBucket() { + const timestamp = this.getCurrentTimeInSeconds(); + if (!this.lastTimestamp) { + this.lastTimestamp = timestamp; + return; + } + const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate; + this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount); + this.lastTimestamp = timestamp; + } + updateClientSendingRate(response) { + let calculatedRate; + this.updateMeasuredRate(); + if (service_error_classification_1.isThrottlingError(response)) { + const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate); + this.lastMaxRate = rateToUse; + this.calculateTimeWindow(); + this.lastThrottleTime = this.getCurrentTimeInSeconds(); + calculatedRate = this.cubicThrottle(rateToUse); + this.enableTokenBucket(); + } + else { + this.calculateTimeWindow(); + calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds()); + } + const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate); + this.updateTokenBucketRate(newRate); + } + calculateTimeWindow() { + this.timeWindow = this.getPrecise(Math.pow((this.lastMaxRate * (1 - this.beta)) / this.scaleConstant, 1 / 3)); + } + cubicThrottle(rateToUse) { + return this.getPrecise(rateToUse * this.beta); + } + cubicSuccess(timestamp) { + return this.getPrecise(this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate); + } + enableTokenBucket() { + this.enabled = true; + } + updateTokenBucketRate(newRate) { + this.refillTokenBucket(); + this.fillRate = Math.max(newRate, this.minFillRate); + this.maxCapacity = Math.max(newRate, this.minCapacity); + this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity); + } + updateMeasuredRate() { + const t = this.getCurrentTimeInSeconds(); + const timeBucket = Math.floor(t * 2) / 2; + this.requestCount++; + if (timeBucket > this.lastTxRateBucket) { + const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket); + this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth)); + this.requestCount = 0; + this.lastTxRateBucket = timeBucket; + } + } + getPrecise(num) { + return parseFloat(num.toFixed(8)); + } +} +exports.DefaultRateLimiter = DefaultRateLimiter; + + +/***/ }), + +/***/ 533: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StandardRetryStrategy = void 0; +const protocol_http_1 = __nccwpck_require__(223); +const service_error_classification_1 = __nccwpck_require__(1921); +const uuid_1 = __nccwpck_require__(5840); +const config_1 = __nccwpck_require__(5192); +const constants_1 = __nccwpck_require__(41); +const defaultRetryQuota_1 = __nccwpck_require__(2568); +const delayDecider_1 = __nccwpck_require__(5940); +const retryDecider_1 = __nccwpck_require__(9572); +class StandardRetryStrategy { + constructor(maxAttemptsProvider, options) { + var _a, _b, _c; + this.maxAttemptsProvider = maxAttemptsProvider; + this.mode = config_1.RETRY_MODES.STANDARD; + this.retryDecider = (_a = options === null || options === void 0 ? void 0 : options.retryDecider) !== null && _a !== void 0 ? _a : retryDecider_1.defaultRetryDecider; + this.delayDecider = (_b = options === null || options === void 0 ? void 0 : options.delayDecider) !== null && _b !== void 0 ? _b : delayDecider_1.defaultDelayDecider; + this.retryQuota = (_c = options === null || options === void 0 ? void 0 : options.retryQuota) !== null && _c !== void 0 ? _c : defaultRetryQuota_1.getDefaultRetryQuota(constants_1.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 = config_1.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 (protocol_http_1.HttpRequest.isInstance(request)) { + request.headers[constants_1.INVOCATION_ID_HEADER] = uuid_1.v4(); + } + while (true) { + try { + if (protocol_http_1.HttpRequest.isInstance(request)) { + request.headers[constants_1.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; + } + if (options === null || options === void 0 ? void 0 : options.beforeRequest) { + await options.beforeRequest(); + } + const { response, output } = await next(args); + if (options === null || options === void 0 ? 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 delay = this.delayDecider(service_error_classification_1.isThrottlingError(err) ? constants_1.THROTTLING_RETRY_DELAY_BASE : constants_1.DEFAULT_RETRY_DELAY_BASE, attempts); + 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; + } + } + } +} +exports.StandardRetryStrategy = StandardRetryStrategy; +const asSdkError = (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}`); +}; + + +/***/ }), + +/***/ 5192: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DEFAULT_RETRY_MODE = exports.DEFAULT_MAX_ATTEMPTS = exports.RETRY_MODES = void 0; +var RETRY_MODES; +(function (RETRY_MODES) { + RETRY_MODES["STANDARD"] = "standard"; + RETRY_MODES["ADAPTIVE"] = "adaptive"; +})(RETRY_MODES = exports.RETRY_MODES || (exports.RETRY_MODES = {})); +exports.DEFAULT_MAX_ATTEMPTS = 3; +exports.DEFAULT_RETRY_MODE = RETRY_MODES.STANDARD; + + +/***/ }), + +/***/ 6160: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NODE_RETRY_MODE_CONFIG_OPTIONS = exports.CONFIG_RETRY_MODE = exports.ENV_RETRY_MODE = exports.resolveRetryConfig = exports.NODE_MAX_ATTEMPT_CONFIG_OPTIONS = exports.CONFIG_MAX_ATTEMPTS = exports.ENV_MAX_ATTEMPTS = void 0; +const AdaptiveRetryStrategy_1 = __nccwpck_require__(7328); +const config_1 = __nccwpck_require__(5192); +const StandardRetryStrategy_1 = __nccwpck_require__(533); +exports.ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS"; +exports.CONFIG_MAX_ATTEMPTS = "max_attempts"; +exports.NODE_MAX_ATTEMPT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => { + const value = env[exports.ENV_MAX_ATTEMPTS]; + if (!value) + return undefined; + const maxAttempt = parseInt(value); + if (Number.isNaN(maxAttempt)) { + throw new Error(`Environment variable ${exports.ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`); + } + return maxAttempt; + }, + configFileSelector: (profile) => { + const value = profile[exports.CONFIG_MAX_ATTEMPTS]; + if (!value) + return undefined; + const maxAttempt = parseInt(value); + if (Number.isNaN(maxAttempt)) { + throw new Error(`Shared config file entry ${exports.CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`); + } + return maxAttempt; + }, + default: config_1.DEFAULT_MAX_ATTEMPTS, +}; +const resolveRetryConfig = (input) => { + const maxAttempts = normalizeMaxAttempts(input.maxAttempts); + return { + ...input, + maxAttempts, + retryStrategy: async () => { + if (input.retryStrategy) { + return input.retryStrategy; + } + const retryMode = await getRetryMode(input.retryMode); + if (retryMode === config_1.RETRY_MODES.ADAPTIVE) { + return new AdaptiveRetryStrategy_1.AdaptiveRetryStrategy(maxAttempts); + } + return new StandardRetryStrategy_1.StandardRetryStrategy(maxAttempts); + }, + }; +}; +exports.resolveRetryConfig = resolveRetryConfig; +const getRetryMode = async (retryMode) => { + if (typeof retryMode === "string") { + return retryMode; + } + return await retryMode(); +}; +const normalizeMaxAttempts = (maxAttempts = config_1.DEFAULT_MAX_ATTEMPTS) => { + if (typeof maxAttempts === "number") { + const promisified = Promise.resolve(maxAttempts); + return () => promisified; + } + return maxAttempts; +}; +exports.ENV_RETRY_MODE = "AWS_RETRY_MODE"; +exports.CONFIG_RETRY_MODE = "retry_mode"; +exports.NODE_RETRY_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[exports.ENV_RETRY_MODE], + configFileSelector: (profile) => profile[exports.CONFIG_RETRY_MODE], + default: config_1.DEFAULT_RETRY_MODE, +}; + + +/***/ }), + +/***/ 41: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.REQUEST_HEADER = exports.INVOCATION_ID_HEADER = exports.NO_RETRY_INCREMENT = exports.TIMEOUT_RETRY_COST = exports.RETRY_COST = exports.INITIAL_RETRY_TOKENS = exports.THROTTLING_RETRY_DELAY_BASE = exports.MAXIMUM_RETRY_DELAY = exports.DEFAULT_RETRY_DELAY_BASE = void 0; +exports.DEFAULT_RETRY_DELAY_BASE = 100; +exports.MAXIMUM_RETRY_DELAY = 20 * 1000; +exports.THROTTLING_RETRY_DELAY_BASE = 500; +exports.INITIAL_RETRY_TOKENS = 500; +exports.RETRY_COST = 5; +exports.TIMEOUT_RETRY_COST = 10; +exports.NO_RETRY_INCREMENT = 1; +exports.INVOCATION_ID_HEADER = "amz-sdk-invocation-id"; +exports.REQUEST_HEADER = "amz-sdk-request"; + + +/***/ }), + +/***/ 2568: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getDefaultRetryQuota = void 0; +const constants_1 = __nccwpck_require__(41); +const getDefaultRetryQuota = (initialRetryTokens, options) => { + var _a, _b, _c; + const MAX_CAPACITY = initialRetryTokens; + const noRetryIncrement = (_a = options === null || options === void 0 ? void 0 : options.noRetryIncrement) !== null && _a !== void 0 ? _a : constants_1.NO_RETRY_INCREMENT; + const retryCost = (_b = options === null || options === void 0 ? void 0 : options.retryCost) !== null && _b !== void 0 ? _b : constants_1.RETRY_COST; + const timeoutRetryCost = (_c = options === null || options === void 0 ? void 0 : options.timeoutRetryCost) !== null && _c !== void 0 ? _c : constants_1.TIMEOUT_RETRY_COST; + let availableCapacity = initialRetryTokens; + const getCapacityAmount = (error) => (error.name === "TimeoutError" ? timeoutRetryCost : retryCost); + const hasRetryTokens = (error) => getCapacityAmount(error) <= availableCapacity; + const retrieveRetryTokens = (error) => { + if (!hasRetryTokens(error)) { + throw new Error("No retry token available"); + } + const capacityAmount = getCapacityAmount(error); + availableCapacity -= capacityAmount; + return capacityAmount; + }; + const releaseRetryTokens = (capacityReleaseAmount) => { + availableCapacity += capacityReleaseAmount !== null && capacityReleaseAmount !== void 0 ? capacityReleaseAmount : noRetryIncrement; + availableCapacity = Math.min(availableCapacity, MAX_CAPACITY); + }; + return Object.freeze({ + hasRetryTokens, + retrieveRetryTokens, + releaseRetryTokens, + }); +}; +exports.getDefaultRetryQuota = getDefaultRetryQuota; + + +/***/ }), + +/***/ 5940: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultDelayDecider = void 0; +const constants_1 = __nccwpck_require__(41); +const defaultDelayDecider = (delayBase, attempts) => Math.floor(Math.min(constants_1.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); +exports.defaultDelayDecider = defaultDelayDecider; + + +/***/ }), + +/***/ 6064: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(7328), exports); +tslib_1.__exportStar(__nccwpck_require__(6402), exports); +tslib_1.__exportStar(__nccwpck_require__(533), exports); +tslib_1.__exportStar(__nccwpck_require__(5192), exports); +tslib_1.__exportStar(__nccwpck_require__(6160), exports); +tslib_1.__exportStar(__nccwpck_require__(5940), exports); +tslib_1.__exportStar(__nccwpck_require__(3521), exports); +tslib_1.__exportStar(__nccwpck_require__(9572), exports); +tslib_1.__exportStar(__nccwpck_require__(1806), exports); +tslib_1.__exportStar(__nccwpck_require__(8580), exports); + + +/***/ }), + +/***/ 3521: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getOmitRetryHeadersPlugin = exports.omitRetryHeadersMiddlewareOptions = exports.omitRetryHeadersMiddleware = void 0; +const protocol_http_1 = __nccwpck_require__(223); +const constants_1 = __nccwpck_require__(41); +const omitRetryHeadersMiddleware = () => (next) => async (args) => { + const { request } = args; + if (protocol_http_1.HttpRequest.isInstance(request)) { + delete request.headers[constants_1.INVOCATION_ID_HEADER]; + delete request.headers[constants_1.REQUEST_HEADER]; + } + return next(args); +}; +exports.omitRetryHeadersMiddleware = omitRetryHeadersMiddleware; +exports.omitRetryHeadersMiddlewareOptions = { + name: "omitRetryHeadersMiddleware", + tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"], + relation: "before", + toMiddleware: "awsAuthMiddleware", + override: true, +}; +const getOmitRetryHeadersPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(exports.omitRetryHeadersMiddleware(), exports.omitRetryHeadersMiddlewareOptions); + }, +}); +exports.getOmitRetryHeadersPlugin = getOmitRetryHeadersPlugin; + + +/***/ }), + +/***/ 9572: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultRetryDecider = void 0; +const service_error_classification_1 = __nccwpck_require__(1921); +const defaultRetryDecider = (error) => { + if (!error) { + return false; + } + return service_error_classification_1.isRetryableByTrait(error) || service_error_classification_1.isClockSkewError(error) || service_error_classification_1.isThrottlingError(error) || service_error_classification_1.isTransientError(error); +}; +exports.defaultRetryDecider = defaultRetryDecider; + + +/***/ }), + +/***/ 1806: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRetryPlugin = exports.retryMiddlewareOptions = exports.retryMiddleware = void 0; +const retryMiddleware = (options) => (next, context) => async (args) => { + const retryStrategy = await options.retryStrategy(); + if (retryStrategy === null || retryStrategy === void 0 ? void 0 : retryStrategy.mode) + context.userAgent = [...(context.userAgent || []), ["cfg/retry-mode", retryStrategy.mode]]; + return retryStrategy.retry(next, args); +}; +exports.retryMiddleware = retryMiddleware; +exports.retryMiddlewareOptions = { + name: "retryMiddleware", + tags: ["RETRY"], + step: "finalizeRequest", + priority: "high", + override: true, +}; +const getRetryPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(exports.retryMiddleware(options), exports.retryMiddlewareOptions); + }, +}); +exports.getRetryPlugin = getRetryPlugin; + + +/***/ }), + +/***/ 8580: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); + + +/***/ }), + +/***/ 5959: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveStsAuthConfig = void 0; +const middleware_signing_1 = __nccwpck_require__(4935); +const resolveStsAuthConfig = (input, { stsClientCtor }) => middleware_signing_1.resolveAwsAuthConfig({ + ...input, + stsClientCtor, +}); +exports.resolveStsAuthConfig = resolveStsAuthConfig; + + +/***/ }), + +/***/ 5648: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.deserializerMiddleware = void 0; +const deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => { + const { response } = await next(args); + const parsed = await deserializer(response, options); + return { + response, + output: parsed, + }; +}; +exports.deserializerMiddleware = deserializerMiddleware; + + +/***/ }), + +/***/ 3631: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(5648), exports); +tslib_1.__exportStar(__nccwpck_require__(9328), exports); +tslib_1.__exportStar(__nccwpck_require__(9511), exports); + + +/***/ }), + +/***/ 9328: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getSerdePlugin = exports.serializerMiddlewareOption = exports.deserializerMiddlewareOption = void 0; +const deserializerMiddleware_1 = __nccwpck_require__(5648); +const serializerMiddleware_1 = __nccwpck_require__(9511); +exports.deserializerMiddlewareOption = { + name: "deserializerMiddleware", + step: "deserialize", + tags: ["DESERIALIZER"], + override: true, +}; +exports.serializerMiddlewareOption = { + name: "serializerMiddleware", + step: "serialize", + tags: ["SERIALIZER"], + override: true, +}; +function getSerdePlugin(config, serializer, deserializer) { + return { + applyToStack: (commandStack) => { + commandStack.add(deserializerMiddleware_1.deserializerMiddleware(config, deserializer), exports.deserializerMiddlewareOption); + commandStack.add(serializerMiddleware_1.serializerMiddleware(config, serializer), exports.serializerMiddlewareOption); + }, + }; +} +exports.getSerdePlugin = getSerdePlugin; + + +/***/ }), + +/***/ 9511: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.serializerMiddleware = void 0; +const serializerMiddleware = (options, serializer) => (next, context) => async (args) => { + const request = await serializer(args.input, options); + return next({ + ...args, + request, + }); +}; +exports.serializerMiddleware = serializerMiddleware; + + +/***/ }), + +/***/ 3061: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveSigV4AuthConfig = exports.resolveAwsAuthConfig = void 0; +const property_provider_1 = __nccwpck_require__(4462); +const signature_v4_1 = __nccwpck_require__(7776); +const CREDENTIAL_EXPIRE_WINDOW = 300000; +const resolveAwsAuthConfig = (input) => { + const normalizedCreds = input.credentials + ? normalizeCredentialProvider(input.credentials) + : input.credentialDefaultProvider(input); + const { signingEscapePath = true, systemClockOffset = input.systemClockOffset || 0, sha256 } = input; + let signer; + if (input.signer) { + signer = normalizeProvider(input.signer); + } + else { + signer = () => 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 signerConstructor = input.signerConstructor || signature_v4_1.SignatureV4; + return new signerConstructor(params); + }); + } + return { + ...input, + systemClockOffset, + signingEscapePath, + credentials: normalizedCreds, + signer, + }; +}; +exports.resolveAwsAuthConfig = resolveAwsAuthConfig; +const resolveSigV4AuthConfig = (input) => { + const normalizedCreds = input.credentials + ? normalizeCredentialProvider(input.credentials) + : input.credentialDefaultProvider(input); + const { signingEscapePath = true, systemClockOffset = input.systemClockOffset || 0, sha256 } = input; + let signer; + if (input.signer) { + signer = normalizeProvider(input.signer); + } + else { + signer = normalizeProvider(new signature_v4_1.SignatureV4({ + credentials: normalizedCreds, + region: input.region, + service: input.signingName, + sha256, + uriEscapePath: signingEscapePath, + })); + } + return { + ...input, + systemClockOffset, + signingEscapePath, + credentials: normalizedCreds, + signer, + }; +}; +exports.resolveSigV4AuthConfig = resolveSigV4AuthConfig; +const normalizeProvider = (input) => { + if (typeof input === "object") { + const promisified = Promise.resolve(input); + return () => promisified; + } + return input; +}; +const normalizeCredentialProvider = (credentials) => { + if (typeof credentials === "function") { + return property_provider_1.memoize(credentials, (credentials) => credentials.expiration !== undefined && + credentials.expiration.getTime() - Date.now() < CREDENTIAL_EXPIRE_WINDOW, (credentials) => credentials.expiration !== undefined); + } + return normalizeProvider(credentials); +}; + + +/***/ }), + +/***/ 4935: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(3061), exports); +tslib_1.__exportStar(__nccwpck_require__(2509), exports); + + +/***/ }), + +/***/ 2509: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getSigV4AuthPlugin = exports.getAwsAuthPlugin = exports.awsAuthMiddlewareOptions = exports.awsAuthMiddleware = void 0; +const protocol_http_1 = __nccwpck_require__(223); +const getSkewCorrectedDate_1 = __nccwpck_require__(8253); +const getUpdatedSystemClockOffset_1 = __nccwpck_require__(5863); +const awsAuthMiddleware = (options) => (next, context) => async function (args) { + if (!protocol_http_1.HttpRequest.isInstance(args.request)) + return next(args); + const signer = await options.signer(); + const output = await next({ + ...args, + request: await signer.sign(args.request, { + signingDate: getSkewCorrectedDate_1.getSkewCorrectedDate(options.systemClockOffset), + signingRegion: context["signing_region"], + signingService: context["signing_service"], + }), + }).catch((error) => { + if (error.ServerTime) { + options.systemClockOffset = getUpdatedSystemClockOffset_1.getUpdatedSystemClockOffset(error.ServerTime, options.systemClockOffset); + } + throw error; + }); + const { headers } = output.response; + const dateHeader = headers && (headers.date || headers.Date); + if (dateHeader) { + options.systemClockOffset = getUpdatedSystemClockOffset_1.getUpdatedSystemClockOffset(dateHeader, options.systemClockOffset); + } + return output; +}; +exports.awsAuthMiddleware = awsAuthMiddleware; +exports.awsAuthMiddlewareOptions = { + name: "awsAuthMiddleware", + tags: ["SIGNATURE", "AWSAUTH"], + relation: "after", + toMiddleware: "retryMiddleware", + override: true, +}; +const getAwsAuthPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(exports.awsAuthMiddleware(options), exports.awsAuthMiddlewareOptions); + }, +}); +exports.getAwsAuthPlugin = getAwsAuthPlugin; +exports.getSigV4AuthPlugin = exports.getAwsAuthPlugin; + + +/***/ }), + +/***/ 8253: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getSkewCorrectedDate = void 0; +const getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset); +exports.getSkewCorrectedDate = getSkewCorrectedDate; + + +/***/ }), + +/***/ 5863: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getUpdatedSystemClockOffset = void 0; +const isClockSkewed_1 = __nccwpck_require__(5301); +const getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => { + const clockTimeInMs = Date.parse(clockTime); + if (isClockSkewed_1.isClockSkewed(clockTimeInMs, currentSystemClockOffset)) { + return clockTimeInMs - Date.now(); + } + return currentSystemClockOffset; +}; +exports.getUpdatedSystemClockOffset = getUpdatedSystemClockOffset; + + +/***/ }), + +/***/ 5301: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isClockSkewed = void 0; +const getSkewCorrectedDate_1 = __nccwpck_require__(8253); +const isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate_1.getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 300000; +exports.isClockSkewed = isClockSkewed; + + +/***/ }), + +/***/ 8399: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.constructStack = void 0; +const constructStack = () => { + let absoluteEntries = []; + let relativeEntries = []; + const entriesNameSet = new Set(); + const sort = (entries) => entries.sort((a, b) => stepWeights[b.step] - stepWeights[a.step] || + priorityWeights[b.priority || "normal"] - priorityWeights[a.priority || "normal"]); + const removeByName = (toRemove) => { + let isRemoved = false; + const filterCb = (entry) => { + if (entry.name && entry.name === toRemove) { + isRemoved = true; + entriesNameSet.delete(toRemove); + return false; + } + return true; + }; + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }; + const removeByReference = (toRemove) => { + let isRemoved = false; + const filterCb = (entry) => { + if (entry.middleware === toRemove) { + isRemoved = true; + if (entry.name) + entriesNameSet.delete(entry.name); + return false; + } + return true; + }; + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }; + const cloneTo = (toStack) => { + absoluteEntries.forEach((entry) => { + toStack.add(entry.middleware, { ...entry }); + }); + relativeEntries.forEach((entry) => { + toStack.addRelativeTo(entry.middleware, { ...entry }); + }); + return toStack; + }; + const expandRelativeMiddlewareList = (from) => { + const expandedMiddlewareList = []; + from.before.forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } + else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + expandedMiddlewareList.push(from); + from.after.reverse().forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } + else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + return expandedMiddlewareList; + }; + const getMiddlewareList = () => { + const normalizedAbsoluteEntries = []; + const normalizedRelativeEntries = []; + const normalizedEntriesNameMap = {}; + absoluteEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [], + }; + if (normalizedEntry.name) + normalizedEntriesNameMap[normalizedEntry.name] = normalizedEntry; + normalizedAbsoluteEntries.push(normalizedEntry); + }); + relativeEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [], + }; + if (normalizedEntry.name) + normalizedEntriesNameMap[normalizedEntry.name] = normalizedEntry; + normalizedRelativeEntries.push(normalizedEntry); + }); + normalizedRelativeEntries.forEach((entry) => { + if (entry.toMiddleware) { + const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware]; + if (toMiddleware === undefined) { + throw new Error(`${entry.toMiddleware} is not found when adding ${entry.name || "anonymous"} middleware ${entry.relation} ${entry.toMiddleware}`); + } + if (entry.relation === "after") { + toMiddleware.after.push(entry); + } + if (entry.relation === "before") { + toMiddleware.before.push(entry); + } + } + }); + const mainChain = sort(normalizedAbsoluteEntries) + .map(expandRelativeMiddlewareList) + .reduce((wholeList, expendedMiddlewareList) => { + wholeList.push(...expendedMiddlewareList); + return wholeList; + }, []); + return mainChain.map((entry) => entry.middleware); + }; + const stack = { + add: (middleware, options = {}) => { + const { name, override } = options; + const entry = { + step: "initialize", + priority: "normal", + middleware, + ...options, + }; + if (name) { + if (entriesNameSet.has(name)) { + if (!override) + throw new Error(`Duplicate middleware name '${name}'`); + const toOverrideIndex = absoluteEntries.findIndex((entry) => entry.name === name); + const toOverride = absoluteEntries[toOverrideIndex]; + if (toOverride.step !== entry.step || toOverride.priority !== entry.priority) { + throw new Error(`"${name}" middleware with ${toOverride.priority} priority in ${toOverride.step} step cannot be ` + + `overridden by same-name middleware with ${entry.priority} priority in ${entry.step} step.`); + } + absoluteEntries.splice(toOverrideIndex, 1); + } + entriesNameSet.add(name); + } + absoluteEntries.push(entry); + }, + addRelativeTo: (middleware, options) => { + const { name, override } = options; + const entry = { + middleware, + ...options, + }; + if (name) { + if (entriesNameSet.has(name)) { + if (!override) + throw new Error(`Duplicate middleware name '${name}'`); + const toOverrideIndex = relativeEntries.findIndex((entry) => entry.name === name); + const toOverride = relativeEntries[toOverrideIndex]; + if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) { + throw new Error(`"${name}" middleware ${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden ` + + `by same-name middleware ${entry.relation} "${entry.toMiddleware}" middleware.`); + } + relativeEntries.splice(toOverrideIndex, 1); + } + entriesNameSet.add(name); + } + relativeEntries.push(entry); + }, + clone: () => cloneTo(exports.constructStack()), + use: (plugin) => { + plugin.applyToStack(stack); + }, + remove: (toRemove) => { + if (typeof toRemove === "string") + return removeByName(toRemove); + else + return removeByReference(toRemove); + }, + removeByTag: (toRemove) => { + let isRemoved = false; + const filterCb = (entry) => { + const { tags, name } = entry; + if (tags && tags.includes(toRemove)) { + if (name) + entriesNameSet.delete(name); + isRemoved = true; + return false; + } + return true; + }; + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, + concat: (from) => { + const cloned = cloneTo(exports.constructStack()); + cloned.use(from); + return cloned; + }, + applyToStack: cloneTo, + resolve: (handler, context) => { + for (const middleware of getMiddlewareList().reverse()) { + handler = middleware(handler, context); + } + return handler; + }, + }; + return stack; +}; +exports.constructStack = constructStack; +const stepWeights = { + initialize: 5, + serialize: 4, + build: 3, + finalizeRequest: 2, + deserialize: 1, +}; +const priorityWeights = { + high: 3, + normal: 2, + low: 1, +}; + + +/***/ }), + +/***/ 1461: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(8399), exports); + + +/***/ }), + +/***/ 6546: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveUserAgentConfig = void 0; +function resolveUserAgentConfig(input) { + return { + ...input, + customUserAgent: typeof input.customUserAgent === "string" ? [[input.customUserAgent]] : input.customUserAgent, + }; +} +exports.resolveUserAgentConfig = resolveUserAgentConfig; + + +/***/ }), + +/***/ 8025: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UA_ESCAPE_REGEX = exports.SPACE = exports.X_AMZ_USER_AGENT = exports.USER_AGENT = void 0; +exports.USER_AGENT = "user-agent"; +exports.X_AMZ_USER_AGENT = "x-amz-user-agent"; +exports.SPACE = " "; +exports.UA_ESCAPE_REGEX = /[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g; + + +/***/ }), + +/***/ 4688: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(6546), exports); +tslib_1.__exportStar(__nccwpck_require__(6236), exports); + + +/***/ }), + +/***/ 6236: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getUserAgentPlugin = exports.getUserAgentMiddlewareOptions = exports.userAgentMiddleware = void 0; +const protocol_http_1 = __nccwpck_require__(223); +const constants_1 = __nccwpck_require__(8025); +const userAgentMiddleware = (options) => (next, context) => async (args) => { + var _a, _b; + const { request } = args; + if (!protocol_http_1.HttpRequest.isInstance(request)) + return next(args); + const { headers } = request; + const userAgent = ((_a = context === null || context === void 0 ? void 0 : context.userAgent) === null || _a === void 0 ? void 0 : _a.map(escapeUserAgent)) || []; + const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent); + const customUserAgent = ((_b = options === null || options === void 0 ? void 0 : options.customUserAgent) === null || _b === void 0 ? void 0 : _b.map(escapeUserAgent)) || []; + const sdkUserAgentValue = [...defaultUserAgent, ...userAgent, ...customUserAgent].join(constants_1.SPACE); + const normalUAValue = [ + ...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")), + ...customUserAgent, + ].join(constants_1.SPACE); + if (options.runtime !== "browser") { + if (normalUAValue) { + headers[constants_1.X_AMZ_USER_AGENT] = headers[constants_1.X_AMZ_USER_AGENT] + ? `${headers[constants_1.USER_AGENT]} ${normalUAValue}` + : normalUAValue; + } + headers[constants_1.USER_AGENT] = sdkUserAgentValue; + } + else { + headers[constants_1.X_AMZ_USER_AGENT] = sdkUserAgentValue; + } + return next({ + ...args, + request, + }); +}; +exports.userAgentMiddleware = userAgentMiddleware; +const escapeUserAgent = ([name, version]) => { + const prefixSeparatorIndex = name.indexOf("/"); + 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) + .map((item) => item === null || item === void 0 ? void 0 : item.replace(constants_1.UA_ESCAPE_REGEX, "_")) + .join("/"); +}; +exports.getUserAgentMiddlewareOptions = { + name: "getUserAgentMiddleware", + step: "build", + priority: "low", + tags: ["SET_USER_AGENT", "USER_AGENT"], + override: true, +}; +const getUserAgentPlugin = (config) => ({ + applyToStack: (clientStack) => { + clientStack.add(exports.userAgentMiddleware(config), exports.getUserAgentMiddlewareOptions); + }, +}); +exports.getUserAgentPlugin = getUserAgentPlugin; + + +/***/ }), + +/***/ 2175: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.loadConfig = void 0; +const property_provider_1 = __nccwpck_require__(4462); +const fromEnv_1 = __nccwpck_require__(6161); +const fromSharedConfigFiles_1 = __nccwpck_require__(3905); +const fromStatic_1 = __nccwpck_require__(5881); +const loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => property_provider_1.memoize(property_provider_1.chain(fromEnv_1.fromEnv(environmentVariableSelector), fromSharedConfigFiles_1.fromSharedConfigFiles(configFileSelector, configuration), fromStatic_1.fromStatic(defaultValue))); +exports.loadConfig = loadConfig; + + +/***/ }), + +/***/ 6161: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromEnv = void 0; +const property_provider_1 = __nccwpck_require__(4462); +const fromEnv = (envVarSelector) => async () => { + try { + const config = envVarSelector(process.env); + if (config === undefined) { + throw new Error(); + } + return config; + } + catch (e) { + throw new property_provider_1.CredentialsProviderError(e.message || `Cannot load config from environment variables with getter: ${envVarSelector}`); + } +}; +exports.fromEnv = fromEnv; + + +/***/ }), + +/***/ 3905: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromSharedConfigFiles = exports.ENV_PROFILE = void 0; +const property_provider_1 = __nccwpck_require__(4462); +const shared_ini_file_loader_1 = __nccwpck_require__(7387); +const DEFAULT_PROFILE = "default"; +exports.ENV_PROFILE = "AWS_PROFILE"; +const fromSharedConfigFiles = (configSelector, { preferredFile = "config", ...init } = {}) => async () => { + const { loadedConfig = shared_ini_file_loader_1.loadSharedConfigFiles(init), profile = process.env[exports.ENV_PROFILE] || DEFAULT_PROFILE } = init; + const { configFile, credentialsFile } = await loadedConfig; + const profileFromCredentials = credentialsFile[profile] || {}; + const profileFromConfig = configFile[profile] || {}; + const mergedProfile = preferredFile === "config" + ? { ...profileFromCredentials, ...profileFromConfig } + : { ...profileFromConfig, ...profileFromCredentials }; + try { + const configValue = configSelector(mergedProfile); + if (configValue === undefined) { + throw new Error(); + } + return configValue; + } + catch (e) { + throw new property_provider_1.CredentialsProviderError(e.message || + `Cannot load config for profile ${profile} in SDK configuration files with getter: ${configSelector}`); + } +}; +exports.fromSharedConfigFiles = fromSharedConfigFiles; + + +/***/ }), + +/***/ 5881: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromStatic = void 0; +const property_provider_1 = __nccwpck_require__(4462); +const isFunction = (func) => typeof func === "function"; +const fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => defaultValue() : property_provider_1.fromStatic(defaultValue); +exports.fromStatic = fromStatic; + + +/***/ }), + +/***/ 7684: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(2175), exports); + + +/***/ }), + +/***/ 3647: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NODEJS_TIMEOUT_ERROR_CODES = void 0; +exports.NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; + + +/***/ }), + +/***/ 6225: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getTransformedHeaders = void 0; +const getTransformedHeaders = (headers) => { + const transformedHeaders = {}; + for (const name of Object.keys(headers)) { + const headerValues = headers[name]; + transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; + } + return transformedHeaders; +}; +exports.getTransformedHeaders = getTransformedHeaders; + + +/***/ }), + +/***/ 8805: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(2298), exports); +tslib_1.__exportStar(__nccwpck_require__(2533), exports); +tslib_1.__exportStar(__nccwpck_require__(2198), exports); + + +/***/ }), + +/***/ 2298: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NodeHttpHandler = void 0; +const protocol_http_1 = __nccwpck_require__(223); +const querystring_builder_1 = __nccwpck_require__(3402); +const http_1 = __nccwpck_require__(8605); +const https_1 = __nccwpck_require__(7211); +const constants_1 = __nccwpck_require__(3647); +const get_transformed_headers_1 = __nccwpck_require__(6225); +const set_connection_timeout_1 = __nccwpck_require__(3598); +const set_socket_timeout_1 = __nccwpck_require__(4751); +const write_request_body_1 = __nccwpck_require__(5248); +class NodeHttpHandler { + constructor({ connectionTimeout, socketTimeout, httpAgent, httpsAgent } = {}) { + this.metadata = { handlerProtocol: "http/1.1" }; + this.connectionTimeout = connectionTimeout; + this.socketTimeout = socketTimeout; + const keepAlive = true; + const maxSockets = 50; + this.httpAgent = httpAgent || new http_1.Agent({ keepAlive, maxSockets }); + this.httpsAgent = httpsAgent || new https_1.Agent({ keepAlive, maxSockets }); + } + destroy() { + this.httpAgent.destroy(); + this.httpsAgent.destroy(); + } + handle(request, { abortSignal } = {}) { + return new Promise((resolve, reject) => { + if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const isSSL = request.protocol === "https:"; + const queryString = querystring_builder_1.buildQueryString(request.query || {}); + const nodeHttpsOptions = { + headers: request.headers, + host: request.hostname, + method: request.method, + path: queryString ? `${request.path}?${queryString}` : request.path, + port: request.port, + agent: isSSL ? this.httpsAgent : this.httpAgent, + }; + const requestFunc = isSSL ? https_1.request : http_1.request; + const req = requestFunc(nodeHttpsOptions, (res) => { + const httpResponse = new protocol_http_1.HttpResponse({ + statusCode: res.statusCode || -1, + headers: get_transformed_headers_1.getTransformedHeaders(res.headers), + body: res, + }); + resolve({ response: httpResponse }); + }); + req.on("error", (err) => { + if (constants_1.NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) { + reject(Object.assign(err, { name: "TimeoutError" })); + } + else { + reject(err); + } + }); + set_connection_timeout_1.setConnectionTimeout(req, reject, this.connectionTimeout); + set_socket_timeout_1.setSocketTimeout(req, reject, this.socketTimeout); + if (abortSignal) { + abortSignal.onabort = () => { + req.abort(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }; + } + write_request_body_1.writeRequestBody(req, request); + }); + } +} +exports.NodeHttpHandler = NodeHttpHandler; + + +/***/ }), + +/***/ 2533: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NodeHttp2Handler = void 0; +const protocol_http_1 = __nccwpck_require__(223); +const querystring_builder_1 = __nccwpck_require__(3402); +const http2_1 = __nccwpck_require__(7565); +const get_transformed_headers_1 = __nccwpck_require__(6225); +const write_request_body_1 = __nccwpck_require__(5248); +class NodeHttp2Handler { + constructor({ requestTimeout, sessionTimeout, disableConcurrentStreams } = {}) { + this.metadata = { handlerProtocol: "h2" }; + this.requestTimeout = requestTimeout; + this.sessionTimeout = sessionTimeout; + this.disableConcurrentStreams = disableConcurrentStreams; + this.sessionCache = new Map(); + } + destroy() { + for (const sessions of this.sessionCache.values()) { + sessions.forEach((session) => this.destroySession(session)); + } + this.sessionCache.clear(); + } + handle(request, { abortSignal } = {}) { + return new Promise((resolve, rejectOriginal) => { + let fulfilled = false; + if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { + fulfilled = true; + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + rejectOriginal(abortError); + return; + } + const { hostname, method, port, protocol, path, query } = request; + const authority = `${protocol}//${hostname}${port ? `:${port}` : ""}`; + const session = this.getSession(authority, this.disableConcurrentStreams || false); + const reject = (err) => { + if (this.disableConcurrentStreams) { + this.destroySession(session); + } + fulfilled = true; + rejectOriginal(err); + }; + const queryString = querystring_builder_1.buildQueryString(query || {}); + const req = session.request({ + ...request.headers, + [http2_1.constants.HTTP2_HEADER_PATH]: queryString ? `${path}?${queryString}` : path, + [http2_1.constants.HTTP2_HEADER_METHOD]: method, + }); + req.on("response", (headers) => { + const httpResponse = new protocol_http_1.HttpResponse({ + statusCode: headers[":status"] || -1, + headers: get_transformed_headers_1.getTransformedHeaders(headers), + body: req, + }); + fulfilled = true; + resolve({ response: httpResponse }); + if (this.disableConcurrentStreams) { + session.close(); + this.deleteSessionFromCache(authority, session); + } + }); + const requestTimeout = this.requestTimeout; + if (requestTimeout) { + req.setTimeout(requestTimeout, () => { + req.close(); + const timeoutError = new Error(`Stream timed out because of no activity for ${requestTimeout} ms`); + timeoutError.name = "TimeoutError"; + reject(timeoutError); + }); + } + if (abortSignal) { + abortSignal.onabort = () => { + req.close(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }; + } + req.on("frameError", (type, code, id) => { + reject(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); + }); + req.on("error", reject); + req.on("aborted", () => { + reject(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`)); + }); + req.on("close", () => { + if (this.disableConcurrentStreams) { + session.destroy(); + } + if (!fulfilled) { + reject(new Error("Unexpected error: http2 request did not get a response")); + } + }); + write_request_body_1.writeRequestBody(req, request); + }); + } + getSession(authority, disableConcurrentStreams) { + const sessionCache = this.sessionCache; + const existingSessions = sessionCache.get(authority) || []; + if (existingSessions.length > 0 && !disableConcurrentStreams) + return existingSessions[0]; + const newSession = http2_1.connect(authority); + const destroySessionCb = () => { + this.destroySession(newSession); + this.deleteSessionFromCache(authority, newSession); + }; + newSession.on("goaway", destroySessionCb); + newSession.on("error", destroySessionCb); + newSession.on("frameError", destroySessionCb); + const sessionTimeout = this.sessionTimeout; + if (sessionTimeout) { + newSession.setTimeout(sessionTimeout, destroySessionCb); + } + existingSessions.push(newSession); + sessionCache.set(authority, existingSessions); + return newSession; + } + destroySession(session) { + if (!session.destroyed) { + session.destroy(); + } + } + deleteSessionFromCache(authority, session) { + const existingSessions = this.sessionCache.get(authority) || []; + if (!existingSessions.includes(session)) { + return; + } + this.sessionCache.set(authority, existingSessions.filter((s) => s !== session)); + } +} +exports.NodeHttp2Handler = NodeHttp2Handler; + + +/***/ }), + +/***/ 3598: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.setConnectionTimeout = void 0; +const setConnectionTimeout = (request, reject, timeoutInMs = 0) => { + if (!timeoutInMs) { + return; + } + request.on("socket", (socket) => { + if (socket.connecting) { + const timeoutId = setTimeout(() => { + request.destroy(); + reject(Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), { + name: "TimeoutError", + })); + }, timeoutInMs); + socket.on("connect", () => { + clearTimeout(timeoutId); + }); + } + }); +}; +exports.setConnectionTimeout = setConnectionTimeout; + + +/***/ }), + +/***/ 4751: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.setSocketTimeout = void 0; +const setSocketTimeout = (request, reject, timeoutInMs = 0) => { + request.setTimeout(timeoutInMs, () => { + request.destroy(); + reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: "TimeoutError" })); + }); +}; +exports.setSocketTimeout = setSocketTimeout; + + +/***/ }), + +/***/ 4362: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Collector = void 0; +const stream_1 = __nccwpck_require__(2413); +class Collector extends stream_1.Writable { + constructor() { + super(...arguments); + this.bufferedBytes = []; + } + _write(chunk, encoding, callback) { + this.bufferedBytes.push(chunk); + callback(); + } +} +exports.Collector = Collector; + + +/***/ }), + +/***/ 2198: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.streamCollector = void 0; +const collector_1 = __nccwpck_require__(4362); +const streamCollector = (stream) => new Promise((resolve, reject) => { + const collector = new collector_1.Collector(); + stream.pipe(collector); + stream.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function () { + const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); + resolve(bytes); + }); +}); +exports.streamCollector = streamCollector; + + +/***/ }), + +/***/ 5248: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.writeRequestBody = void 0; +const stream_1 = __nccwpck_require__(2413); +function writeRequestBody(httpRequest, request) { + const expect = request.headers["Expect"] || request.headers["expect"]; + if (expect === "100-continue") { + httpRequest.on("continue", () => { + writeBody(httpRequest, request.body); + }); + } + else { + writeBody(httpRequest, request.body); + } +} +exports.writeRequestBody = writeRequestBody; +function writeBody(httpRequest, body) { + if (body instanceof stream_1.Readable) { + body.pipe(httpRequest); + } + else if (body) { + httpRequest.end(Buffer.from(body)); + } + else { + httpRequest.end(); + } +} + + +/***/ }), + +/***/ 1786: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CredentialsProviderError = exports.ProviderError = void 0; +class ProviderError extends Error { + constructor(message, tryNextLink = true) { + super(message); + this.tryNextLink = tryNextLink; + } + static from(error, tryNextLink = true) { + Object.defineProperty(error, "tryNextLink", { + value: tryNextLink, + configurable: false, + enumerable: false, + writable: false, + }); + return error; + } +} +exports.ProviderError = ProviderError; +class CredentialsProviderError extends Error { + constructor(message, tryNextLink = true) { + super(message); + this.tryNextLink = tryNextLink; + this.name = "CredentialsProviderError"; + } + static from(error, tryNextLink = true) { + Object.defineProperty(error, "tryNextLink", { + value: tryNextLink, + configurable: false, + enumerable: false, + writable: false, + }); + return error; + } +} +exports.CredentialsProviderError = CredentialsProviderError; + + +/***/ }), + +/***/ 1444: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.chain = void 0; +const ProviderError_1 = __nccwpck_require__(1786); +function chain(...providers) { + return () => { + let promise = Promise.reject(new ProviderError_1.ProviderError("No providers in chain")); + for (const provider of providers) { + promise = promise.catch((err) => { + if (err === null || err === void 0 ? void 0 : err.tryNextLink) { + return provider(); + } + throw err; + }); + } + return promise; + }; +} +exports.chain = chain; + + +/***/ }), + +/***/ 529: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromStatic = void 0; +const fromStatic = (staticValue) => () => Promise.resolve(staticValue); +exports.fromStatic = fromStatic; + + +/***/ }), + +/***/ 4462: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(1786), exports); +tslib_1.__exportStar(__nccwpck_require__(1444), exports); +tslib_1.__exportStar(__nccwpck_require__(529), exports); +tslib_1.__exportStar(__nccwpck_require__(714), exports); + + +/***/ }), + +/***/ 714: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.memoize = void 0; +const memoize = (provider, isExpired, requiresRefresh) => { + let resolved; + let pending; + let hasResult; + const coalesceProvider = async () => { + if (!pending) { + pending = provider(); + } + try { + resolved = await pending; + hasResult = true; + } + finally { + pending = undefined; + } + return resolved; + }; + if (isExpired === undefined) { + return async () => { + if (!hasResult) { + resolved = await coalesceProvider(); + } + return resolved; + }; + } + let isConstant = false; + return async () => { + if (!hasResult) { + resolved = await coalesceProvider(); + } + if (isConstant) { + return resolved; + } + if (requiresRefresh && !requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(); + return resolved; + } + return resolved; + }; +}; +exports.memoize = memoize; + + +/***/ }), + +/***/ 6779: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); + + +/***/ }), + +/***/ 2872: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.HttpRequest = void 0; +class HttpRequest { + constructor(options) { + this.method = options.method || "GET"; + this.hostname = options.hostname || "localhost"; + this.port = options.port; + this.query = options.query || {}; + this.headers = options.headers || {}; + this.body = options.body; + this.protocol = options.protocol + ? options.protocol.substr(-1) !== ":" + ? `${options.protocol}:` + : options.protocol + : "https:"; + this.path = options.path ? (options.path.charAt(0) !== "/" ? `/${options.path}` : options.path) : "/"; + } + static isInstance(request) { + if (!request) + return false; + const req = request; + return ("method" in req && + "protocol" in req && + "hostname" in req && + "path" in req && + typeof req["query"] === "object" && + typeof req["headers"] === "object"); + } + clone() { + const cloned = new HttpRequest({ + ...this, + headers: { ...this.headers }, + }); + if (cloned.query) + cloned.query = cloneQuery(cloned.query); + return cloned; + } +} +exports.HttpRequest = HttpRequest; +function cloneQuery(query) { + return Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param, + }; + }, {}); +} + + +/***/ }), + +/***/ 2348: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.HttpResponse = void 0; +class HttpResponse { + constructor(options) { + this.statusCode = options.statusCode; + this.headers = options.headers || {}; + this.body = options.body; + } + static isInstance(response) { + if (!response) + return false; + const resp = response; + return typeof resp.statusCode === "number" && typeof resp.headers === "object"; + } +} +exports.HttpResponse = HttpResponse; + + +/***/ }), + +/***/ 223: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(6779), exports); +tslib_1.__exportStar(__nccwpck_require__(2872), exports); +tslib_1.__exportStar(__nccwpck_require__(2348), exports); +tslib_1.__exportStar(__nccwpck_require__(5694), exports); + + +/***/ }), + +/***/ 5694: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isValidHostname = void 0; +function isValidHostname(hostname) { + const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; + return hostPattern.test(hostname); +} +exports.isValidHostname = isValidHostname; + + +/***/ }), + +/***/ 3402: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.buildQueryString = void 0; +const util_uri_escape_1 = __nccwpck_require__(7952); +function buildQueryString(query) { + const parts = []; + for (let key of Object.keys(query).sort()) { + const value = query[key]; + key = util_uri_escape_1.escapeUri(key); + if (Array.isArray(value)) { + for (let i = 0, iLen = value.length; i < iLen; i++) { + parts.push(`${key}=${util_uri_escape_1.escapeUri(value[i])}`); + } + } + else { + let qsEntry = key; + if (value || typeof value === "string") { + qsEntry += `=${util_uri_escape_1.escapeUri(value)}`; + } + parts.push(qsEntry); + } + } + return parts.join("&"); +} +exports.buildQueryString = buildQueryString; + + +/***/ }), + +/***/ 7424: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseQueryString = void 0; +function parseQueryString(querystring) { + const query = {}; + querystring = querystring.replace(/^\?/, ""); + if (querystring) { + for (const pair of querystring.split("&")) { + let [key, value = null] = pair.split("="); + key = decodeURIComponent(key); + if (value) { + value = decodeURIComponent(value); + } + if (!(key in query)) { + query[key] = value; + } + else if (Array.isArray(query[key])) { + query[key].push(value); + } + else { + query[key] = [query[key], value]; + } + } + } + return query; +} +exports.parseQueryString = parseQueryString; + + +/***/ }), + +/***/ 7352: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TRANSIENT_ERROR_STATUS_CODES = exports.TRANSIENT_ERROR_CODES = exports.THROTTLING_ERROR_CODES = exports.CLOCK_SKEW_ERROR_CODES = void 0; +exports.CLOCK_SKEW_ERROR_CODES = [ + "AuthFailure", + "InvalidSignatureException", + "RequestExpired", + "RequestInTheFuture", + "RequestTimeTooSkewed", + "SignatureDoesNotMatch", +]; +exports.THROTTLING_ERROR_CODES = [ + "BandwidthLimitExceeded", + "EC2ThrottledException", + "LimitExceededException", + "PriorRequestNotComplete", + "ProvisionedThroughputExceededException", + "RequestLimitExceeded", + "RequestThrottled", + "RequestThrottledException", + "SlowDown", + "ThrottledException", + "Throttling", + "ThrottlingException", + "TooManyRequestsException", + "TransactionInProgressException", +]; +exports.TRANSIENT_ERROR_CODES = ["AbortError", "TimeoutError", "RequestTimeout", "RequestTimeoutException"]; +exports.TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504]; + + +/***/ }), + +/***/ 1921: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isTransientError = exports.isThrottlingError = exports.isClockSkewError = exports.isRetryableByTrait = void 0; +const constants_1 = __nccwpck_require__(7352); +const isRetryableByTrait = (error) => error.$retryable !== undefined; +exports.isRetryableByTrait = isRetryableByTrait; +const isClockSkewError = (error) => constants_1.CLOCK_SKEW_ERROR_CODES.includes(error.name); +exports.isClockSkewError = isClockSkewError; +const isThrottlingError = (error) => { + var _a, _b; + return ((_a = error.$metadata) === null || _a === void 0 ? void 0 : _a.httpStatusCode) === 429 || + constants_1.THROTTLING_ERROR_CODES.includes(error.name) || + ((_b = error.$retryable) === null || _b === void 0 ? void 0 : _b.throttling) == true; +}; +exports.isThrottlingError = isThrottlingError; +const isTransientError = (error) => { + var _a; + return constants_1.TRANSIENT_ERROR_CODES.includes(error.name) || + constants_1.TRANSIENT_ERROR_STATUS_CODES.includes(((_a = error.$metadata) === null || _a === void 0 ? void 0 : _a.httpStatusCode) || 0); +}; +exports.isTransientError = isTransientError; + + +/***/ }), + +/***/ 7387: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getHomeDir = exports.loadSharedConfigFiles = exports.ENV_CONFIG_PATH = exports.ENV_CREDENTIALS_PATH = void 0; +const fs_1 = __nccwpck_require__(5747); +const os_1 = __nccwpck_require__(2087); +const path_1 = __nccwpck_require__(5622); +exports.ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; +exports.ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; +const swallowError = () => ({}); +const loadSharedConfigFiles = (init = {}) => { + const { filepath = process.env[exports.ENV_CREDENTIALS_PATH] || path_1.join(exports.getHomeDir(), ".aws", "credentials"), configFilepath = process.env[exports.ENV_CONFIG_PATH] || path_1.join(exports.getHomeDir(), ".aws", "config"), } = init; + return Promise.all([ + slurpFile(configFilepath).then(parseIni).then(normalizeConfigFile).catch(swallowError), + slurpFile(filepath).then(parseIni).catch(swallowError), + ]).then((parsedFiles) => { + const [configFile, credentialsFile] = parsedFiles; + return { + configFile, + credentialsFile, + }; + }); +}; +exports.loadSharedConfigFiles = loadSharedConfigFiles; +const profileKeyRegex = /^profile\s(["'])?([^\1]+)\1$/; +const normalizeConfigFile = (data) => { + const map = {}; + for (const key of Object.keys(data)) { + let matches; + if (key === "default") { + map.default = data.default; + } + else if ((matches = profileKeyRegex.exec(key))) { + const [_1, _2, normalizedKey] = matches; + if (normalizedKey) { + map[normalizedKey] = data[key]; + } + } + } + return map; +}; +const profileNameBlockList = ["__proto__", "profile __proto__"]; +const parseIni = (iniData) => { + const map = {}; + let currentSection; + for (let line of iniData.split(/\r?\n/)) { + line = line.split(/(^|\s)[;#]/)[0]; + const section = line.match(/^\s*\[([^\[\]]+)]\s*$/); + if (section) { + currentSection = section[1]; + if (profileNameBlockList.includes(currentSection)) { + throw new Error(`Found invalid profile name "${currentSection}"`); + } + } + else if (currentSection) { + const item = line.match(/^\s*(.+?)\s*=\s*(.+?)\s*$/); + if (item) { + map[currentSection] = map[currentSection] || {}; + map[currentSection][item[1]] = item[2]; + } + } + } + return map; +}; +const slurpFile = (path) => new Promise((resolve, reject) => { + fs_1.readFile(path, "utf8", (err, data) => { + if (err) { + reject(err); + } + else { + resolve(data); + } + }); +}); +const getHomeDir = () => { + const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; + if (HOME) + return HOME; + if (USERPROFILE) + return USERPROFILE; + if (HOMEPATH) + return `${HOMEDRIVE}${HOMEPATH}`; + return os_1.homedir(); +}; +exports.getHomeDir = getHomeDir; + + +/***/ }), + +/***/ 5086: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SignatureV4 = void 0; +const util_hex_encoding_1 = __nccwpck_require__(1968); +const constants_1 = __nccwpck_require__(342); +const credentialDerivation_1 = __nccwpck_require__(8023); +const getCanonicalHeaders_1 = __nccwpck_require__(3590); +const getCanonicalQuery_1 = __nccwpck_require__(2019); +const getPayloadHash_1 = __nccwpck_require__(7080); +const headerUtil_1 = __nccwpck_require__(4120); +const moveHeadersToQuery_1 = __nccwpck_require__(8201); +const normalizeProvider_1 = __nccwpck_require__(7027); +const prepareRequest_1 = __nccwpck_require__(5772); +const utilDate_1 = __nccwpck_require__(4799); +class SignatureV4 { + constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true, }) { + this.service = service; + this.sha256 = sha256; + this.uriEscapePath = uriEscapePath; + this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true; + this.regionProvider = normalizeProvider_1.normalizeRegionProvider(region); + this.credentialProvider = normalizeProvider_1.normalizeCredentialsProvider(credentials); + } + async presign(originalRequest, options = {}) { + const { signingDate = new Date(), expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, signingRegion, signingService, } = options; + const credentials = await this.credentialProvider(); + const region = signingRegion !== null && signingRegion !== void 0 ? signingRegion : (await this.regionProvider()); + const { longDate, shortDate } = formatDate(signingDate); + if (expiresIn > constants_1.MAX_PRESIGNED_TTL) { + return Promise.reject("Signature version 4 presigned URLs" + " must have an expiration date less than one week in" + " the future"); + } + const scope = credentialDerivation_1.createScope(shortDate, region, signingService !== null && signingService !== void 0 ? signingService : this.service); + const request = moveHeadersToQuery_1.moveHeadersToQuery(prepareRequest_1.prepareRequest(originalRequest), { unhoistableHeaders }); + if (credentials.sessionToken) { + request.query[constants_1.TOKEN_QUERY_PARAM] = credentials.sessionToken; + } + request.query[constants_1.ALGORITHM_QUERY_PARAM] = constants_1.ALGORITHM_IDENTIFIER; + request.query[constants_1.CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`; + request.query[constants_1.AMZ_DATE_QUERY_PARAM] = longDate; + request.query[constants_1.EXPIRES_QUERY_PARAM] = expiresIn.toString(10); + const canonicalHeaders = getCanonicalHeaders_1.getCanonicalHeaders(request, unsignableHeaders, signableHeaders); + request.query[constants_1.SIGNED_HEADERS_QUERY_PARAM] = getCanonicalHeaderList(canonicalHeaders); + request.query[constants_1.SIGNATURE_QUERY_PARAM] = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash_1.getPayloadHash(originalRequest, this.sha256))); + return request; + } + async sign(toSign, options) { + if (typeof toSign === "string") { + return this.signString(toSign, options); + } + else if (toSign.headers && toSign.payload) { + return this.signEvent(toSign, options); + } + else { + return this.signRequest(toSign, options); + } + } + async signEvent({ headers, payload }, { signingDate = new Date(), priorSignature, signingRegion, signingService }) { + const region = signingRegion !== null && signingRegion !== void 0 ? signingRegion : (await this.regionProvider()); + const { shortDate, longDate } = formatDate(signingDate); + const scope = credentialDerivation_1.createScope(shortDate, region, signingService !== null && signingService !== void 0 ? signingService : this.service); + const hashedPayload = await getPayloadHash_1.getPayloadHash({ headers: {}, body: payload }, this.sha256); + const hash = new this.sha256(); + hash.update(headers); + const hashedHeaders = util_hex_encoding_1.toHex(await hash.digest()); + const stringToSign = [ + constants_1.EVENT_ALGORITHM_IDENTIFIER, + longDate, + scope, + priorSignature, + hashedHeaders, + hashedPayload, + ].join("\n"); + return this.signString(stringToSign, { signingDate, signingRegion: region, signingService }); + } + async signString(stringToSign, { signingDate = new Date(), signingRegion, signingService } = {}) { + const credentials = await this.credentialProvider(); + const region = signingRegion !== null && signingRegion !== void 0 ? signingRegion : (await this.regionProvider()); + const { shortDate } = formatDate(signingDate); + const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService)); + hash.update(stringToSign); + return util_hex_encoding_1.toHex(await hash.digest()); + } + async signRequest(requestToSign, { signingDate = new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService, } = {}) { + const credentials = await this.credentialProvider(); + const region = signingRegion !== null && signingRegion !== void 0 ? signingRegion : (await this.regionProvider()); + const request = prepareRequest_1.prepareRequest(requestToSign); + const { longDate, shortDate } = formatDate(signingDate); + const scope = credentialDerivation_1.createScope(shortDate, region, signingService !== null && signingService !== void 0 ? signingService : this.service); + request.headers[constants_1.AMZ_DATE_HEADER] = longDate; + if (credentials.sessionToken) { + request.headers[constants_1.TOKEN_HEADER] = credentials.sessionToken; + } + const payloadHash = await getPayloadHash_1.getPayloadHash(request, this.sha256); + if (!headerUtil_1.hasHeader(constants_1.SHA256_HEADER, request.headers) && this.applyChecksum) { + request.headers[constants_1.SHA256_HEADER] = payloadHash; + } + const canonicalHeaders = getCanonicalHeaders_1.getCanonicalHeaders(request, unsignableHeaders, signableHeaders); + const signature = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash)); + request.headers[constants_1.AUTH_HEADER] = + `${constants_1.ALGORITHM_IDENTIFIER} ` + + `Credential=${credentials.accessKeyId}/${scope}, ` + + `SignedHeaders=${getCanonicalHeaderList(canonicalHeaders)}, ` + + `Signature=${signature}`; + return request; + } + createCanonicalRequest(request, canonicalHeaders, payloadHash) { + const sortedHeaders = Object.keys(canonicalHeaders).sort(); + return `${request.method} +${this.getCanonicalPath(request)} +${getCanonicalQuery_1.getCanonicalQuery(request)} +${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join("\n")} + +${sortedHeaders.join(";")} +${payloadHash}`; + } + async createStringToSign(longDate, credentialScope, canonicalRequest) { + const hash = new this.sha256(); + hash.update(canonicalRequest); + const hashedRequest = await hash.digest(); + return `${constants_1.ALGORITHM_IDENTIFIER} +${longDate} +${credentialScope} +${util_hex_encoding_1.toHex(hashedRequest)}`; + } + getCanonicalPath({ path }) { + if (this.uriEscapePath) { + const doubleEncoded = encodeURIComponent(path.replace(/^\//, "")); + return `/${doubleEncoded.replace(/%2F/g, "/")}`; + } + return path; + } + async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) { + const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest); + const hash = new this.sha256(await keyPromise); + hash.update(stringToSign); + return util_hex_encoding_1.toHex(await hash.digest()); + } + getSigningKey(credentials, region, shortDate, service) { + return credentialDerivation_1.getSigningKey(this.sha256, credentials, shortDate, region, service || this.service); + } +} +exports.SignatureV4 = SignatureV4; +const formatDate = (now) => { + const longDate = utilDate_1.iso8601(now).replace(/[\-:]/g, ""); + return { + longDate, + shortDate: longDate.substr(0, 8), + }; +}; +const getCanonicalHeaderList = (headers) => Object.keys(headers).sort().join(";"); + + +/***/ }), + +/***/ 3141: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.cloneQuery = exports.cloneRequest = void 0; +const cloneRequest = ({ headers, query, ...rest }) => ({ + ...rest, + headers: { ...headers }, + query: query ? exports.cloneQuery(query) : undefined, +}); +exports.cloneRequest = cloneRequest; +const cloneQuery = (query) => Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param, + }; +}, {}); +exports.cloneQuery = cloneQuery; + + +/***/ }), + +/***/ 342: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.MAX_PRESIGNED_TTL = exports.KEY_TYPE_IDENTIFIER = exports.MAX_CACHE_SIZE = exports.UNSIGNED_PAYLOAD = exports.EVENT_ALGORITHM_IDENTIFIER = exports.ALGORITHM_IDENTIFIER_V4A = exports.ALGORITHM_IDENTIFIER = exports.UNSIGNABLE_PATTERNS = exports.SEC_HEADER_PATTERN = exports.PROXY_HEADER_PATTERN = exports.ALWAYS_UNSIGNABLE_HEADERS = exports.HOST_HEADER = exports.TOKEN_HEADER = exports.SHA256_HEADER = exports.SIGNATURE_HEADER = exports.GENERATED_HEADERS = exports.DATE_HEADER = exports.AMZ_DATE_HEADER = exports.AUTH_HEADER = exports.REGION_SET_PARAM = exports.TOKEN_QUERY_PARAM = exports.SIGNATURE_QUERY_PARAM = exports.EXPIRES_QUERY_PARAM = exports.SIGNED_HEADERS_QUERY_PARAM = exports.AMZ_DATE_QUERY_PARAM = exports.CREDENTIAL_QUERY_PARAM = exports.ALGORITHM_QUERY_PARAM = void 0; +exports.ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm"; +exports.CREDENTIAL_QUERY_PARAM = "X-Amz-Credential"; +exports.AMZ_DATE_QUERY_PARAM = "X-Amz-Date"; +exports.SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders"; +exports.EXPIRES_QUERY_PARAM = "X-Amz-Expires"; +exports.SIGNATURE_QUERY_PARAM = "X-Amz-Signature"; +exports.TOKEN_QUERY_PARAM = "X-Amz-Security-Token"; +exports.REGION_SET_PARAM = "X-Amz-Region-Set"; +exports.AUTH_HEADER = "authorization"; +exports.AMZ_DATE_HEADER = exports.AMZ_DATE_QUERY_PARAM.toLowerCase(); +exports.DATE_HEADER = "date"; +exports.GENERATED_HEADERS = [exports.AUTH_HEADER, exports.AMZ_DATE_HEADER, exports.DATE_HEADER]; +exports.SIGNATURE_HEADER = exports.SIGNATURE_QUERY_PARAM.toLowerCase(); +exports.SHA256_HEADER = "x-amz-content-sha256"; +exports.TOKEN_HEADER = exports.TOKEN_QUERY_PARAM.toLowerCase(); +exports.HOST_HEADER = "host"; +exports.ALWAYS_UNSIGNABLE_HEADERS = { + authorization: true, + "cache-control": true, + connection: true, + expect: true, + from: true, + "keep-alive": true, + "max-forwards": true, + pragma: true, + referer: true, + te: true, + trailer: true, + "transfer-encoding": true, + upgrade: true, + "user-agent": true, + "x-amzn-trace-id": true, +}; +exports.PROXY_HEADER_PATTERN = /^proxy-/; +exports.SEC_HEADER_PATTERN = /^sec-/; +exports.UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i]; +exports.ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256"; +exports.ALGORITHM_IDENTIFIER_V4A = "AWS4-ECDSA-P256-SHA256"; +exports.EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD"; +exports.UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD"; +exports.MAX_CACHE_SIZE = 50; +exports.KEY_TYPE_IDENTIFIER = "aws4_request"; +exports.MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7; + + +/***/ }), + +/***/ 8023: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.clearCredentialCache = exports.getSigningKey = exports.createScope = void 0; +const util_hex_encoding_1 = __nccwpck_require__(1968); +const constants_1 = __nccwpck_require__(342); +const signingKeyCache = {}; +const cacheQueue = []; +const createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${constants_1.KEY_TYPE_IDENTIFIER}`; +exports.createScope = createScope; +const getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => { + const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId); + const cacheKey = `${shortDate}:${region}:${service}:${util_hex_encoding_1.toHex(credsHash)}:${credentials.sessionToken}`; + if (cacheKey in signingKeyCache) { + return signingKeyCache[cacheKey]; + } + cacheQueue.push(cacheKey); + while (cacheQueue.length > constants_1.MAX_CACHE_SIZE) { + delete signingKeyCache[cacheQueue.shift()]; + } + let key = `AWS4${credentials.secretAccessKey}`; + for (const signable of [shortDate, region, service, constants_1.KEY_TYPE_IDENTIFIER]) { + key = await hmac(sha256Constructor, key, signable); + } + return (signingKeyCache[cacheKey] = key); +}; +exports.getSigningKey = getSigningKey; +const clearCredentialCache = () => { + cacheQueue.length = 0; + Object.keys(signingKeyCache).forEach((cacheKey) => { + delete signingKeyCache[cacheKey]; + }); +}; +exports.clearCredentialCache = clearCredentialCache; +const hmac = (ctor, secret, data) => { + const hash = new ctor(secret); + hash.update(data); + return hash.digest(); +}; + + +/***/ }), + +/***/ 3590: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getCanonicalHeaders = void 0; +const constants_1 = __nccwpck_require__(342); +const getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => { + const canonical = {}; + for (const headerName of Object.keys(headers).sort()) { + const canonicalHeaderName = headerName.toLowerCase(); + if (canonicalHeaderName in constants_1.ALWAYS_UNSIGNABLE_HEADERS || + (unsignableHeaders === null || unsignableHeaders === void 0 ? void 0 : unsignableHeaders.has(canonicalHeaderName)) || + constants_1.PROXY_HEADER_PATTERN.test(canonicalHeaderName) || + constants_1.SEC_HEADER_PATTERN.test(canonicalHeaderName)) { + if (!signableHeaders || (signableHeaders && !signableHeaders.has(canonicalHeaderName))) { + continue; + } + } + canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " "); + } + return canonical; +}; +exports.getCanonicalHeaders = getCanonicalHeaders; + + +/***/ }), + +/***/ 2019: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getCanonicalQuery = void 0; +const util_uri_escape_1 = __nccwpck_require__(7952); +const constants_1 = __nccwpck_require__(342); +const getCanonicalQuery = ({ query = {} }) => { + const keys = []; + const serialized = {}; + for (const key of Object.keys(query).sort()) { + if (key.toLowerCase() === constants_1.SIGNATURE_HEADER) { + continue; + } + keys.push(key); + const value = query[key]; + if (typeof value === "string") { + serialized[key] = `${util_uri_escape_1.escapeUri(key)}=${util_uri_escape_1.escapeUri(value)}`; + } + else if (Array.isArray(value)) { + serialized[key] = value + .slice(0) + .sort() + .reduce((encoded, value) => encoded.concat([`${util_uri_escape_1.escapeUri(key)}=${util_uri_escape_1.escapeUri(value)}`]), []) + .join("&"); + } + } + return keys + .map((key) => serialized[key]) + .filter((serialized) => serialized) + .join("&"); +}; +exports.getCanonicalQuery = getCanonicalQuery; + + +/***/ }), + +/***/ 7080: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getPayloadHash = void 0; +const is_array_buffer_1 = __nccwpck_require__(9126); +const util_hex_encoding_1 = __nccwpck_require__(1968); +const constants_1 = __nccwpck_require__(342); +const getPayloadHash = async ({ headers, body }, hashConstructor) => { + for (const headerName of Object.keys(headers)) { + if (headerName.toLowerCase() === constants_1.SHA256_HEADER) { + return headers[headerName]; + } + } + if (body == undefined) { + return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; + } + else if (typeof body === "string" || ArrayBuffer.isView(body) || is_array_buffer_1.isArrayBuffer(body)) { + const hashCtor = new hashConstructor(); + hashCtor.update(body); + return util_hex_encoding_1.toHex(await hashCtor.digest()); + } + return constants_1.UNSIGNED_PAYLOAD; +}; +exports.getPayloadHash = getPayloadHash; + + +/***/ }), + +/***/ 4120: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.deleteHeader = exports.getHeaderValue = exports.hasHeader = void 0; +const hasHeader = (soughtHeader, headers) => { + soughtHeader = soughtHeader.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + return true; + } + } + return false; +}; +exports.hasHeader = hasHeader; +const getHeaderValue = (soughtHeader, headers) => { + soughtHeader = soughtHeader.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + return headers[headerName]; + } + } + return undefined; +}; +exports.getHeaderValue = getHeaderValue; +const deleteHeader = (soughtHeader, headers) => { + soughtHeader = soughtHeader.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + delete headers[headerName]; + } + } +}; +exports.deleteHeader = deleteHeader; + + +/***/ }), + +/***/ 7776: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.normalizeRegionProvider = exports.normalizeCredentialsProvider = exports.prepareRequest = exports.moveHeadersToQuery = exports.getPayloadHash = exports.getCanonicalQuery = exports.getCanonicalHeaders = void 0; +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(5086), exports); +var getCanonicalHeaders_1 = __nccwpck_require__(3590); +Object.defineProperty(exports, "getCanonicalHeaders", ({ enumerable: true, get: function () { return getCanonicalHeaders_1.getCanonicalHeaders; } })); +var getCanonicalQuery_1 = __nccwpck_require__(2019); +Object.defineProperty(exports, "getCanonicalQuery", ({ enumerable: true, get: function () { return getCanonicalQuery_1.getCanonicalQuery; } })); +var getPayloadHash_1 = __nccwpck_require__(7080); +Object.defineProperty(exports, "getPayloadHash", ({ enumerable: true, get: function () { return getPayloadHash_1.getPayloadHash; } })); +var moveHeadersToQuery_1 = __nccwpck_require__(8201); +Object.defineProperty(exports, "moveHeadersToQuery", ({ enumerable: true, get: function () { return moveHeadersToQuery_1.moveHeadersToQuery; } })); +var prepareRequest_1 = __nccwpck_require__(5772); +Object.defineProperty(exports, "prepareRequest", ({ enumerable: true, get: function () { return prepareRequest_1.prepareRequest; } })); +var normalizeProvider_1 = __nccwpck_require__(7027); +Object.defineProperty(exports, "normalizeCredentialsProvider", ({ enumerable: true, get: function () { return normalizeProvider_1.normalizeCredentialsProvider; } })); +Object.defineProperty(exports, "normalizeRegionProvider", ({ enumerable: true, get: function () { return normalizeProvider_1.normalizeRegionProvider; } })); +tslib_1.__exportStar(__nccwpck_require__(8023), exports); + + +/***/ }), + +/***/ 8201: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.moveHeadersToQuery = void 0; +const cloneRequest_1 = __nccwpck_require__(3141); +const moveHeadersToQuery = (request, options = {}) => { + var _a; + const { headers, query = {} } = typeof request.clone === "function" ? request.clone() : cloneRequest_1.cloneRequest(request); + for (const name of Object.keys(headers)) { + const lname = name.toLowerCase(); + if (lname.substr(0, 6) === "x-amz-" && !((_a = options.unhoistableHeaders) === null || _a === void 0 ? void 0 : _a.has(lname))) { + query[name] = headers[name]; + delete headers[name]; + } + } + return { + ...request, + headers, + query, + }; +}; +exports.moveHeadersToQuery = moveHeadersToQuery; + + +/***/ }), + +/***/ 7027: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.normalizeCredentialsProvider = exports.normalizeRegionProvider = void 0; +const normalizeRegionProvider = (region) => { + if (typeof region === "string") { + const promisified = Promise.resolve(region); + return () => promisified; + } + else { + return region; + } +}; +exports.normalizeRegionProvider = normalizeRegionProvider; +const normalizeCredentialsProvider = (credentials) => { + if (typeof credentials === "object") { + const promisified = Promise.resolve(credentials); + return () => promisified; + } + else { + return credentials; + } +}; +exports.normalizeCredentialsProvider = normalizeCredentialsProvider; + + +/***/ }), + +/***/ 5772: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.prepareRequest = void 0; +const cloneRequest_1 = __nccwpck_require__(3141); +const constants_1 = __nccwpck_require__(342); +const prepareRequest = (request) => { + request = typeof request.clone === "function" ? request.clone() : cloneRequest_1.cloneRequest(request); + for (const headerName of Object.keys(request.headers)) { + if (constants_1.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) { + delete request.headers[headerName]; + } + } + return request; +}; +exports.prepareRequest = prepareRequest; + + +/***/ }), + +/***/ 4799: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toDate = exports.iso8601 = void 0; +const iso8601 = (time) => exports.toDate(time) + .toISOString() + .replace(/\.\d{3}Z$/, "Z"); +exports.iso8601 = iso8601; +const toDate = (time) => { + if (typeof time === "number") { + return new Date(time * 1000); + } + if (typeof time === "string") { + if (Number(time)) { + return new Date(Number(time) * 1000); + } + return new Date(time); + } + return time; +}; +exports.toDate = toDate; + + +/***/ }), + +/***/ 6034: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Client = void 0; +const middleware_stack_1 = __nccwpck_require__(1461); +class Client { + constructor(config) { + this.middlewareStack = middleware_stack_1.constructStack(); + this.config = config; + } + send(command, optionsOrCb, cb) { + const options = typeof optionsOrCb !== "function" ? optionsOrCb : undefined; + const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb; + const handler = command.resolveMiddleware(this.middlewareStack, this.config, options); + if (callback) { + handler(command) + .then((result) => callback(null, result.output), (err) => callback(err)) + .catch(() => { }); + } + else { + return handler(command).then((result) => result.output); + } + } + destroy() { + if (this.config.requestHandler.destroy) + this.config.requestHandler.destroy(); + } +} +exports.Client = Client; + + +/***/ }), + +/***/ 4014: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Command = void 0; +const middleware_stack_1 = __nccwpck_require__(1461); +class Command { + constructor() { + this.middlewareStack = middleware_stack_1.constructStack(); + } +} +exports.Command = Command; + + +/***/ }), + +/***/ 8392: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SENSITIVE_STRING = void 0; +exports.SENSITIVE_STRING = "***SensitiveInformation***"; + + +/***/ }), + +/***/ 4695: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseEpochTimestamp = exports.parseRfc7231DateTime = exports.parseRfc3339DateTime = exports.dateToUtcString = void 0; +const parse_utils_1 = __nccwpck_require__(4809); +const DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; +const MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; +function dateToUtcString(date) { + const year = date.getUTCFullYear(); + const month = date.getUTCMonth(); + const dayOfWeek = date.getUTCDay(); + const dayOfMonthInt = date.getUTCDate(); + const hoursInt = date.getUTCHours(); + const minutesInt = date.getUTCMinutes(); + const secondsInt = date.getUTCSeconds(); + const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`; + const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`; + const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`; + const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`; + return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`; +} +exports.dateToUtcString = dateToUtcString; +const RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/); +const parseRfc3339DateTime = (value) => { + if (value === null || value === undefined) { + return undefined; + } + if (typeof value !== "string") { + throw new TypeError("RFC-3339 date-times must be expressed as strings"); + } + const match = RFC3339.exec(value); + if (!match) { + throw new TypeError("Invalid RFC-3339 date-time value"); + } + const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match; + const year = parse_utils_1.strictParseShort(stripLeadingZeroes(yearStr)); + const month = parseDateValue(monthStr, "month", 1, 12); + const day = parseDateValue(dayStr, "day", 1, 31); + return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds }); +}; +exports.parseRfc3339DateTime = parseRfc3339DateTime; +const IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/); +const RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/); +const ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/); +const parseRfc7231DateTime = (value) => { + if (value === null || value === undefined) { + return undefined; + } + if (typeof value !== "string") { + throw new TypeError("RFC-7231 date-times must be expressed as strings"); + } + let match = IMF_FIXDATE.exec(value); + if (match) { + const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match; + return buildDate(parse_utils_1.strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds }); + } + match = RFC_850_DATE.exec(value); + if (match) { + const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match; + return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { + hours, + minutes, + seconds, + fractionalMilliseconds, + })); + } + match = ASC_TIME.exec(value); + if (match) { + const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match; + return buildDate(parse_utils_1.strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds }); + } + throw new TypeError("Invalid RFC-7231 date-time value"); +}; +exports.parseRfc7231DateTime = parseRfc7231DateTime; +const parseEpochTimestamp = (value) => { + if (value === null || value === undefined) { + return undefined; + } + let valueAsDouble; + if (typeof value === "number") { + valueAsDouble = value; + } + else if (typeof value === "string") { + valueAsDouble = parse_utils_1.strictParseDouble(value); + } + else { + throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation"); + } + if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) { + throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics"); + } + return new Date(Math.round(valueAsDouble * 1000)); +}; +exports.parseEpochTimestamp = parseEpochTimestamp; +const buildDate = (year, month, day, time) => { + const adjustedMonth = month - 1; + validateDayOfMonth(year, adjustedMonth, day); + return new Date(Date.UTC(year, adjustedMonth, day, parseDateValue(time.hours, "hour", 0, 23), parseDateValue(time.minutes, "minute", 0, 59), parseDateValue(time.seconds, "seconds", 0, 60), parseMilliseconds(time.fractionalMilliseconds))); +}; +const parseTwoDigitYear = (value) => { + const thisYear = new Date().getUTCFullYear(); + const valueInThisCentury = Math.floor(thisYear / 100) * 100 + parse_utils_1.strictParseShort(stripLeadingZeroes(value)); + if (valueInThisCentury < thisYear) { + return valueInThisCentury + 100; + } + return valueInThisCentury; +}; +const FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1000; +const adjustRfc850Year = (input) => { + if (input.getTime() - new Date().getTime() > FIFTY_YEARS_IN_MILLIS) { + return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds())); + } + return input; +}; +const parseMonthByShortName = (value) => { + const monthIdx = MONTHS.indexOf(value); + if (monthIdx < 0) { + throw new TypeError(`Invalid month: ${value}`); + } + return monthIdx + 1; +}; +const DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; +const validateDayOfMonth = (year, month, day) => { + let maxDays = DAYS_IN_MONTH[month]; + if (month === 1 && isLeapYear(year)) { + maxDays = 29; + } + if (day > maxDays) { + throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`); + } +}; +const isLeapYear = (year) => { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); +}; +const parseDateValue = (value, type, lower, upper) => { + const dateVal = parse_utils_1.strictParseByte(stripLeadingZeroes(value)); + if (dateVal < lower || dateVal > upper) { + throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`); + } + return dateVal; +}; +const parseMilliseconds = (value) => { + if (value === null || value === undefined) { + return 0; + } + return parse_utils_1.strictParseFloat32("0." + value) * 1000; +}; +const stripLeadingZeroes = (value) => { + let idx = 0; + while (idx < value.length - 1 && value.charAt(idx) === "0") { + idx++; + } + if (idx === 0) { + return value; + } + return value.slice(idx); +}; + + +/***/ }), + +/***/ 2363: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.emitWarningIfUnsupportedVersion = void 0; +let warningEmitted = false; +const emitWarningIfUnsupportedVersion = (version) => { + if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 12) { + warningEmitted = true; + process.emitWarning(`The AWS SDK for JavaScript (v3) will\n` + + `no longer support Node.js ${version} as of January 1, 2022.\n` + + `To continue receiving updates to AWS services, bug fixes, and security\n` + + `updates please upgrade to Node.js 12.x or later.\n\n` + + `More information can be found at: https://a.co/1l6FLnu`, `NodeDeprecationWarning`); + } +}; +exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion; + + +/***/ }), + +/***/ 1927: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.extendedEncodeURIComponent = void 0; +function extendedEncodeURIComponent(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +exports.extendedEncodeURIComponent = extendedEncodeURIComponent; + + +/***/ }), + +/***/ 6457: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getArrayIfSingleItem = void 0; +const getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray]; +exports.getArrayIfSingleItem = getArrayIfSingleItem; + + +/***/ }), + +/***/ 5830: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getValueFromTextNode = void 0; +const getValueFromTextNode = (obj) => { + const textNodeName = "#text"; + for (const key in obj) { + if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== undefined) { + obj[key] = obj[key][textNodeName]; + } + else if (typeof obj[key] === "object" && obj[key] !== null) { + obj[key] = exports.getValueFromTextNode(obj[key]); + } + } + return obj; +}; +exports.getValueFromTextNode = getValueFromTextNode; + + +/***/ }), + +/***/ 4963: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(6034), exports); +tslib_1.__exportStar(__nccwpck_require__(4014), exports); +tslib_1.__exportStar(__nccwpck_require__(8392), exports); +tslib_1.__exportStar(__nccwpck_require__(4695), exports); +tslib_1.__exportStar(__nccwpck_require__(2363), exports); +tslib_1.__exportStar(__nccwpck_require__(1927), exports); +tslib_1.__exportStar(__nccwpck_require__(6457), exports); +tslib_1.__exportStar(__nccwpck_require__(5830), exports); +tslib_1.__exportStar(__nccwpck_require__(3613), exports); +tslib_1.__exportStar(__nccwpck_require__(4809), exports); +tslib_1.__exportStar(__nccwpck_require__(8000), exports); +tslib_1.__exportStar(__nccwpck_require__(8730), exports); + + +/***/ }), + +/***/ 3613: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.LazyJsonString = exports.StringWrapper = void 0; +const StringWrapper = function () { + const Class = Object.getPrototypeOf(this).constructor; + const Constructor = Function.bind.apply(String, [null, ...arguments]); + const instance = new Constructor(); + Object.setPrototypeOf(instance, Class.prototype); + return instance; +}; +exports.StringWrapper = StringWrapper; +exports.StringWrapper.prototype = Object.create(String.prototype, { + constructor: { + value: exports.StringWrapper, + enumerable: false, + writable: true, + configurable: true, + }, +}); +Object.setPrototypeOf(exports.StringWrapper, String); +class LazyJsonString extends exports.StringWrapper { + deserializeJSON() { + return JSON.parse(super.toString()); + } + toJSON() { + return super.toString(); + } + static fromObject(object) { + if (object instanceof LazyJsonString) { + return object; + } + else if (object instanceof String || typeof object === "string") { + return new LazyJsonString(object); + } + return new LazyJsonString(JSON.stringify(object)); + } +} +exports.LazyJsonString = LazyJsonString; + + +/***/ }), + +/***/ 4809: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.strictParseByte = exports.strictParseShort = exports.strictParseInt32 = exports.strictParseInt = exports.strictParseLong = exports.limitedParseFloat32 = exports.limitedParseFloat = exports.handleFloat = exports.limitedParseDouble = exports.strictParseFloat32 = exports.strictParseFloat = exports.strictParseDouble = exports.expectUnion = exports.expectString = exports.expectObject = exports.expectNonNull = exports.expectByte = exports.expectShort = exports.expectInt32 = exports.expectInt = exports.expectLong = exports.expectFloat32 = exports.expectNumber = exports.expectBoolean = exports.parseBoolean = void 0; +const parseBoolean = (value) => { + switch (value) { + case "true": + return true; + case "false": + return false; + default: + throw new Error(`Unable to parse boolean value "${value}"`); + } +}; +exports.parseBoolean = parseBoolean; +const expectBoolean = (value) => { + if (value === null || value === undefined) { + return undefined; + } + if (typeof value === "boolean") { + return value; + } + throw new TypeError(`Expected boolean, got ${typeof value}`); +}; +exports.expectBoolean = expectBoolean; +const expectNumber = (value) => { + if (value === null || value === undefined) { + return undefined; + } + if (typeof value === "number") { + return value; + } + throw new TypeError(`Expected number, got ${typeof value}`); +}; +exports.expectNumber = expectNumber; +const MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23)); +const expectFloat32 = (value) => { + const expected = exports.expectNumber(value); + if (expected !== undefined && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) { + if (Math.abs(expected) > MAX_FLOAT) { + throw new TypeError(`Expected 32-bit float, got ${value}`); + } + } + return expected; +}; +exports.expectFloat32 = expectFloat32; +const expectLong = (value) => { + if (value === null || value === undefined) { + return undefined; + } + if (Number.isInteger(value) && !Number.isNaN(value)) { + return value; + } + throw new TypeError(`Expected integer, got ${typeof value}`); +}; +exports.expectLong = expectLong; +exports.expectInt = exports.expectLong; +const expectInt32 = (value) => expectSizedInt(value, 32); +exports.expectInt32 = expectInt32; +const expectShort = (value) => expectSizedInt(value, 16); +exports.expectShort = expectShort; +const expectByte = (value) => expectSizedInt(value, 8); +exports.expectByte = expectByte; +const expectSizedInt = (value, size) => { + const expected = exports.expectLong(value); + if (expected !== undefined && castInt(expected, size) !== expected) { + throw new TypeError(`Expected ${size}-bit integer, got ${value}`); + } + return expected; +}; +const castInt = (value, size) => { + switch (size) { + case 32: + return Int32Array.of(value)[0]; + case 16: + return Int16Array.of(value)[0]; + case 8: + return Int8Array.of(value)[0]; + } +}; +const expectNonNull = (value, location) => { + if (value === null || value === undefined) { + if (location) { + throw new TypeError(`Expected a non-null value for ${location}`); + } + throw new TypeError("Expected a non-null value"); + } + return value; +}; +exports.expectNonNull = expectNonNull; +const expectObject = (value) => { + if (value === null || value === undefined) { + return undefined; + } + if (typeof value === "object" && !Array.isArray(value)) { + return value; + } + throw new TypeError(`Expected object, got ${typeof value}`); +}; +exports.expectObject = expectObject; +const expectString = (value) => { + if (value === null || value === undefined) { + return undefined; + } + if (typeof value === "string") { + return value; + } + throw new TypeError(`Expected string, got ${typeof value}`); +}; +exports.expectString = expectString; +const expectUnion = (value) => { + if (value === null || value === undefined) { + return undefined; + } + const asObject = exports.expectObject(value); + const setKeys = Object.entries(asObject) + .filter(([_, v]) => v !== null && v !== undefined) + .map(([k, _]) => k); + if (setKeys.length === 0) { + throw new TypeError(`Unions must have exactly one non-null member`); + } + if (setKeys.length > 1) { + throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`); + } + return asObject; +}; +exports.expectUnion = expectUnion; +const strictParseDouble = (value) => { + if (typeof value == "string") { + return exports.expectNumber(parseNumber(value)); + } + return exports.expectNumber(value); +}; +exports.strictParseDouble = strictParseDouble; +exports.strictParseFloat = exports.strictParseDouble; +const strictParseFloat32 = (value) => { + if (typeof value == "string") { + return exports.expectFloat32(parseNumber(value)); + } + return exports.expectFloat32(value); +}; +exports.strictParseFloat32 = strictParseFloat32; +const NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g; +const parseNumber = (value) => { + const matches = value.match(NUMBER_REGEX); + if (matches === null || matches[0].length !== value.length) { + throw new TypeError(`Expected real number, got implicit NaN`); + } + return parseFloat(value); +}; +const limitedParseDouble = (value) => { + if (typeof value == "string") { + return parseFloatString(value); + } + return exports.expectNumber(value); +}; +exports.limitedParseDouble = limitedParseDouble; +exports.handleFloat = exports.limitedParseDouble; +exports.limitedParseFloat = exports.limitedParseDouble; +const limitedParseFloat32 = (value) => { + if (typeof value == "string") { + return parseFloatString(value); + } + return exports.expectFloat32(value); +}; +exports.limitedParseFloat32 = limitedParseFloat32; +const parseFloatString = (value) => { + switch (value) { + case "NaN": + return NaN; + case "Infinity": + return Infinity; + case "-Infinity": + return -Infinity; + default: + throw new Error(`Unable to parse float value: ${value}`); + } +}; +const strictParseLong = (value) => { + if (typeof value === "string") { + return exports.expectLong(parseNumber(value)); + } + return exports.expectLong(value); +}; +exports.strictParseLong = strictParseLong; +exports.strictParseInt = exports.strictParseLong; +const strictParseInt32 = (value) => { + if (typeof value === "string") { + return exports.expectInt32(parseNumber(value)); + } + return exports.expectInt32(value); +}; +exports.strictParseInt32 = strictParseInt32; +const strictParseShort = (value) => { + if (typeof value === "string") { + return exports.expectShort(parseNumber(value)); + } + return exports.expectShort(value); +}; +exports.strictParseShort = strictParseShort; +const strictParseByte = (value) => { + if (typeof value === "string") { + return exports.expectByte(parseNumber(value)); + } + return exports.expectByte(value); +}; +exports.strictParseByte = strictParseByte; + + +/***/ }), + +/***/ 8000: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.serializeFloat = void 0; +const serializeFloat = (value) => { + if (value !== value) { + return "NaN"; + } + switch (value) { + case Infinity: + return "Infinity"; + case -Infinity: + return "-Infinity"; + default: + return value; + } +}; +exports.serializeFloat = serializeFloat; + + +/***/ }), + +/***/ 8730: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.splitEvery = void 0; +function splitEvery(value, delimiter, numDelimiters) { + if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) { + throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery."); + } + const segments = value.split(delimiter); + if (numDelimiters === 1) { + return segments; + } + const compoundSegments = []; + let currentSegment = ""; + for (let i = 0; i < segments.length; i++) { + if (currentSegment === "") { + currentSegment = segments[i]; + } + else { + currentSegment += delimiter + segments[i]; + } + if ((i + 1) % numDelimiters === 0) { + compoundSegments.push(currentSegment); + currentSegment = ""; + } + } + if (currentSegment !== "") { + compoundSegments.push(currentSegment); + } + return compoundSegments; +} +exports.splitEvery = splitEvery; + + +/***/ }), + +/***/ 2992: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseUrl = void 0; +const querystring_parser_1 = __nccwpck_require__(7424); +const parseUrl = (url) => { + const { hostname, pathname, port, protocol, search } = new URL(url); + let query; + if (search) { + query = querystring_parser_1.parseQueryString(search); + } + return { + hostname, + port: port ? parseInt(port) : undefined, + protocol, + path: pathname, + query, + }; +}; +exports.parseUrl = parseUrl; + + +/***/ }), + +/***/ 8588: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toBase64 = exports.fromBase64 = void 0; +const util_buffer_from_1 = __nccwpck_require__(6010); +const BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; +function fromBase64(input) { + if ((input.length * 3) % 4 !== 0) { + throw new TypeError(`Incorrect padding on base64 string.`); + } + if (!BASE64_REGEX.exec(input)) { + throw new TypeError(`Invalid base64 string.`); + } + const buffer = util_buffer_from_1.fromString(input, "base64"); + return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); +} +exports.fromBase64 = fromBase64; +function toBase64(input) { + return util_buffer_from_1.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("base64"); +} +exports.toBase64 = toBase64; + + +/***/ }), + +/***/ 4147: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.calculateBodyLength = void 0; +const fs_1 = __nccwpck_require__(5747); +function calculateBodyLength(body) { + if (!body) { + return 0; + } + if (typeof body === "string") { + return Buffer.from(body).length; + } + else if (typeof body.byteLength === "number") { + return body.byteLength; + } + else if (typeof body.size === "number") { + return body.size; + } + else if (typeof body.path === "string") { + return fs_1.lstatSync(body.path).size; + } +} +exports.calculateBodyLength = calculateBodyLength; + + +/***/ }), + +/***/ 6010: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromString = exports.fromArrayBuffer = void 0; +const is_array_buffer_1 = __nccwpck_require__(9126); +const buffer_1 = __nccwpck_require__(4293); +const fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => { + if (!is_array_buffer_1.isArrayBuffer(input)) { + throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); + } + return buffer_1.Buffer.from(input, offset, length); +}; +exports.fromArrayBuffer = fromArrayBuffer; +const fromString = (input, encoding) => { + if (typeof input !== "string") { + throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`); + } + return encoding ? buffer_1.Buffer.from(input, encoding) : buffer_1.Buffer.from(input); +}; +exports.fromString = fromString; + + +/***/ }), + +/***/ 9509: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.booleanSelector = exports.SelectorType = void 0; +var SelectorType; +(function (SelectorType) { + SelectorType["ENV"] = "env"; + SelectorType["CONFIG"] = "shared config entry"; +})(SelectorType = exports.SelectorType || (exports.SelectorType = {})); +const booleanSelector = (obj, key, type) => { + if (!(key in obj)) + return undefined; + if (obj[key] === "true") + return true; + if (obj[key] === "false") + return false; + throw new Error(`Cannot load ${type} "${key}". Expected "true" or "false", got ${obj[key]}.`); +}; +exports.booleanSelector = booleanSelector; + + +/***/ }), + +/***/ 6168: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(9509), exports); + + +/***/ }), + +/***/ 8598: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getMasterProfileName = exports.parseKnownFiles = exports.DEFAULT_PROFILE = exports.ENV_PROFILE = void 0; +const shared_ini_file_loader_1 = __nccwpck_require__(7387); +exports.ENV_PROFILE = "AWS_PROFILE"; +exports.DEFAULT_PROFILE = "default"; +const parseKnownFiles = async (init) => { + const { loadedConfig = shared_ini_file_loader_1.loadSharedConfigFiles(init) } = init; + const parsedFiles = await loadedConfig; + return { + ...parsedFiles.configFile, + ...parsedFiles.credentialsFile, + }; +}; +exports.parseKnownFiles = parseKnownFiles; +const getMasterProfileName = (init) => init.profile || process.env[exports.ENV_PROFILE] || exports.DEFAULT_PROFILE; +exports.getMasterProfileName = getMasterProfileName; + + +/***/ }), + +/***/ 1968: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toHex = exports.fromHex = void 0; +const SHORT_TO_HEX = {}; +const HEX_TO_SHORT = {}; +for (let i = 0; i < 256; i++) { + let encodedByte = i.toString(16).toLowerCase(); + if (encodedByte.length === 1) { + encodedByte = `0${encodedByte}`; + } + SHORT_TO_HEX[i] = encodedByte; + HEX_TO_SHORT[encodedByte] = i; +} +function fromHex(encoded) { + if (encoded.length % 2 !== 0) { + throw new Error("Hex encoded strings must have an even number length"); + } + const out = new Uint8Array(encoded.length / 2); + for (let i = 0; i < encoded.length; i += 2) { + const encodedByte = encoded.substr(i, 2).toLowerCase(); + if (encodedByte in HEX_TO_SHORT) { + out[i / 2] = HEX_TO_SHORT[encodedByte]; + } + else { + throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`); + } + } + return out; +} +exports.fromHex = fromHex; +function toHex(bytes) { + let out = ""; + for (let i = 0; i < bytes.byteLength; i++) { + out += SHORT_TO_HEX[bytes[i]]; + } + return out; +} +exports.toHex = toHex; + + +/***/ }), + +/***/ 5774: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.escapeUriPath = void 0; +const escape_uri_1 = __nccwpck_require__(4652); +const escapeUriPath = (uri) => uri.split("/").map(escape_uri_1.escapeUri).join("/"); +exports.escapeUriPath = escapeUriPath; + + +/***/ }), + +/***/ 4652: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.escapeUri = void 0; +const escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode); +exports.escapeUri = escapeUri; +const hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`; + + +/***/ }), + +/***/ 7952: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(4652), exports); +tslib_1.__exportStar(__nccwpck_require__(5774), exports); + + +/***/ }), + +/***/ 8095: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultUserAgent = exports.UA_APP_ID_INI_NAME = exports.UA_APP_ID_ENV_NAME = void 0; +const node_config_provider_1 = __nccwpck_require__(7684); +const os_1 = __nccwpck_require__(2087); +const process_1 = __nccwpck_require__(1765); +const is_crt_available_1 = __nccwpck_require__(8390); +exports.UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID"; +exports.UA_APP_ID_INI_NAME = "sdk-ua-app-id"; +const defaultUserAgent = ({ serviceId, clientVersion }) => { + const sections = [ + ["aws-sdk-js", clientVersion], + [`os/${os_1.platform()}`, os_1.release()], + ["lang/js"], + ["md/nodejs", `${process_1.versions.node}`], + ]; + const crtAvailable = is_crt_available_1.isCrtAvailable(); + if (crtAvailable) { + sections.push(crtAvailable); + } + if (serviceId) { + sections.push([`api/${serviceId}`, clientVersion]); + } + if (process_1.env.AWS_EXECUTION_ENV) { + sections.push([`exec-env/${process_1.env.AWS_EXECUTION_ENV}`]); + } + const appIdPromise = node_config_provider_1.loadConfig({ + environmentVariableSelector: (env) => env[exports.UA_APP_ID_ENV_NAME], + configFileSelector: (profile) => profile[exports.UA_APP_ID_INI_NAME], + default: undefined, + })(); + let resolvedUserAgent = undefined; + return async () => { + if (!resolvedUserAgent) { + const appId = await appIdPromise; + resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections]; + } + return resolvedUserAgent; + }; +}; +exports.defaultUserAgent = defaultUserAgent; + + +/***/ }), + +/***/ 8390: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isCrtAvailable = void 0; +const isCrtAvailable = () => { + try { + if ( true && __nccwpck_require__(7578)) { + return ["md/crt-avail"]; + } + return null; + } + catch (e) { + return null; + } +}; +exports.isCrtAvailable = isCrtAvailable; + + +/***/ }), + +/***/ 6278: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toUtf8 = exports.fromUtf8 = void 0; +const util_buffer_from_1 = __nccwpck_require__(6010); +const fromUtf8 = (input) => { + const buf = util_buffer_from_1.fromString(input, "utf8"); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); +}; +exports.fromUtf8 = fromUtf8; +const toUtf8 = (input) => util_buffer_from_1.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); +exports.toUtf8 = toUtf8; + + +/***/ }), + +/***/ 8880: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createWaiter = void 0; +const poller_1 = __nccwpck_require__(2105); +const utils_1 = __nccwpck_require__(6001); +const waiter_1 = __nccwpck_require__(4996); +const abortTimeout = async (abortSignal) => { + return new Promise((resolve) => { + abortSignal.onabort = () => resolve({ state: waiter_1.WaiterState.ABORTED }); + }); +}; +const createWaiter = async (options, input, acceptorChecks) => { + const params = { + ...waiter_1.waiterServiceDefaults, + ...options, + }; + utils_1.validateWaiterOptions(params); + const exitConditions = [poller_1.runPolling(params, input, acceptorChecks)]; + if (options.abortController) { + exitConditions.push(abortTimeout(options.abortController.signal)); + } + if (options.abortSignal) { + exitConditions.push(abortTimeout(options.abortSignal)); + } + return Promise.race(exitConditions); +}; +exports.createWaiter = createWaiter; + + +/***/ }), + +/***/ 1627: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(8880), exports); +tslib_1.__exportStar(__nccwpck_require__(4996), exports); + + +/***/ }), + +/***/ 2105: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.runPolling = void 0; +const sleep_1 = __nccwpck_require__(7397); +const waiter_1 = __nccwpck_require__(4996); +const exponentialBackoffWithJitter = (minDelay, maxDelay, attemptCeiling, attempt) => { + if (attempt > attemptCeiling) + return maxDelay; + const delay = minDelay * 2 ** (attempt - 1); + return randomInRange(minDelay, delay); +}; +const randomInRange = (min, max) => min + Math.random() * (max - min); +const runPolling = async ({ minDelay, maxDelay, maxWaitTime, abortController, client, abortSignal }, input, acceptorChecks) => { + var _a; + const { state } = await acceptorChecks(client, input); + if (state !== waiter_1.WaiterState.RETRY) { + return { state }; + } + let currentAttempt = 1; + const waitUntil = Date.now() + maxWaitTime * 1000; + const attemptCeiling = Math.log(maxDelay / minDelay) / Math.log(2) + 1; + while (true) { + if (((_a = abortController === null || abortController === void 0 ? void 0 : abortController.signal) === null || _a === void 0 ? void 0 : _a.aborted) || (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted)) { + return { state: waiter_1.WaiterState.ABORTED }; + } + const delay = exponentialBackoffWithJitter(minDelay, maxDelay, attemptCeiling, currentAttempt); + if (Date.now() + delay * 1000 > waitUntil) { + return { state: waiter_1.WaiterState.TIMEOUT }; + } + await sleep_1.sleep(delay); + const { state } = await acceptorChecks(client, input); + if (state !== waiter_1.WaiterState.RETRY) { + return { state }; + } + currentAttempt += 1; + } +}; +exports.runPolling = runPolling; + + +/***/ }), + +/***/ 6001: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(7397), exports); +tslib_1.__exportStar(__nccwpck_require__(3931), exports); + + +/***/ }), + +/***/ 7397: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.sleep = void 0; +const sleep = (seconds) => { + return new Promise((resolve) => setTimeout(resolve, seconds * 1000)); +}; +exports.sleep = sleep; + + +/***/ }), + +/***/ 3931: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.validateWaiterOptions = void 0; +const validateWaiterOptions = (options) => { + if (options.maxWaitTime < 1) { + throw new Error(`WaiterConfiguration.maxWaitTime must be greater than 0`); + } + else if (options.minDelay < 1) { + throw new Error(`WaiterConfiguration.minDelay must be greater than 0`); + } + else if (options.maxDelay < 1) { + throw new Error(`WaiterConfiguration.maxDelay must be greater than 0`); + } + else if (options.maxWaitTime <= options.minDelay) { + throw new Error(`WaiterConfiguration.maxWaitTime [${options.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`); + } + else if (options.maxDelay < options.minDelay) { + throw new Error(`WaiterConfiguration.maxDelay [${options.maxDelay}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`); + } +}; +exports.validateWaiterOptions = validateWaiterOptions; + + +/***/ }), + +/***/ 4996: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.checkExceptions = exports.WaiterState = exports.waiterServiceDefaults = void 0; +exports.waiterServiceDefaults = { + minDelay: 2, + maxDelay: 120, +}; +var WaiterState; +(function (WaiterState) { + WaiterState["ABORTED"] = "ABORTED"; + WaiterState["FAILURE"] = "FAILURE"; + WaiterState["SUCCESS"] = "SUCCESS"; + WaiterState["RETRY"] = "RETRY"; + WaiterState["TIMEOUT"] = "TIMEOUT"; +})(WaiterState = exports.WaiterState || (exports.WaiterState = {})); +const checkExceptions = (result) => { + if (result.state === WaiterState.ABORTED) { + const abortError = new Error(`${JSON.stringify({ + ...result, + reason: "Request was aborted", + })}`); + abortError.name = "AbortError"; + throw abortError; + } + else if (result.state === WaiterState.TIMEOUT) { + const timeoutError = new Error(`${JSON.stringify({ + ...result, + reason: "Waiter has timed out", + })}`); + timeoutError.name = "TimeoutError"; + throw timeoutError; + } + else if (result.state !== WaiterState.SUCCESS) { + throw new Error(`${JSON.stringify({ result })}`); + } + return result; +}; +exports.checkExceptions = checkExceptions; + + +/***/ }), + +/***/ 5107: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.decodeHTML = exports.decodeHTMLStrict = exports.decodeXML = void 0; +var entities_json_1 = __importDefault(__nccwpck_require__(4007)); +var legacy_json_1 = __importDefault(__nccwpck_require__(7802)); +var xml_json_1 = __importDefault(__nccwpck_require__(2228)); +var decode_codepoint_1 = __importDefault(__nccwpck_require__(1227)); +var strictEntityRe = /&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g; +exports.decodeXML = getStrictDecoder(xml_json_1.default); +exports.decodeHTMLStrict = getStrictDecoder(entities_json_1.default); +function getStrictDecoder(map) { + var replace = getReplacer(map); + return function (str) { return String(str).replace(strictEntityRe, replace); }; +} +var sorter = function (a, b) { return (a < b ? 1 : -1); }; +exports.decodeHTML = (function () { + var legacy = Object.keys(legacy_json_1.default).sort(sorter); + var keys = Object.keys(entities_json_1.default).sort(sorter); + for (var i = 0, j = 0; i < keys.length; i++) { + if (legacy[j] === keys[i]) { + keys[i] += ";?"; + j++; + } + else { + keys[i] += ";"; + } + } + var re = new RegExp("&(?:" + keys.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"); + var replace = getReplacer(entities_json_1.default); + function replacer(str) { + if (str.substr(-1) !== ";") + str += ";"; + return replace(str); + } + // TODO consider creating a merged map + return function (str) { return String(str).replace(re, replacer); }; +})(); +function getReplacer(map) { + return function replace(str) { + if (str.charAt(1) === "#") { + var secondChar = str.charAt(2); + if (secondChar === "X" || secondChar === "x") { + return decode_codepoint_1.default(parseInt(str.substr(3), 16)); + } + return decode_codepoint_1.default(parseInt(str.substr(2), 10)); + } + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + return map[str.slice(1, -1)] || str; + }; +} + + +/***/ }), + +/***/ 1227: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var decode_json_1 = __importDefault(__nccwpck_require__(4589)); +// Adapted from https://github.com/mathiasbynens/he/blob/master/src/he.js#L94-L119 +var fromCodePoint = +// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition +String.fromCodePoint || + function (codePoint) { + var output = ""; + if (codePoint > 0xffff) { + codePoint -= 0x10000; + output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800); + codePoint = 0xdc00 | (codePoint & 0x3ff); + } + output += String.fromCharCode(codePoint); + return output; + }; +function decodeCodePoint(codePoint) { + if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) { + return "\uFFFD"; + } + if (codePoint in decode_json_1.default) { + codePoint = decode_json_1.default[codePoint]; + } + return fromCodePoint(codePoint); +} +exports.default = decodeCodePoint; + + +/***/ }), + +/***/ 2006: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = void 0; +var xml_json_1 = __importDefault(__nccwpck_require__(2228)); +var inverseXML = getInverseObj(xml_json_1.default); +var xmlReplacer = getInverseReplacer(inverseXML); +/** + * Encodes all non-ASCII characters, as well as characters not valid in XML + * documents using XML entities. + * + * If a character has no equivalent entity, a + * numeric hexadecimal reference (eg. `ü`) will be used. + */ +exports.encodeXML = getASCIIEncoder(inverseXML); +var entities_json_1 = __importDefault(__nccwpck_require__(4007)); +var inverseHTML = getInverseObj(entities_json_1.default); +var htmlReplacer = getInverseReplacer(inverseHTML); +/** + * Encodes all entities and non-ASCII characters in the input. + * + * This includes characters that are valid ASCII characters in HTML documents. + * For example `#` will be encoded as `#`. To get a more compact output, + * consider using the `encodeNonAsciiHTML` function. + * + * If a character has no equivalent entity, a + * numeric hexadecimal reference (eg. `ü`) will be used. + */ +exports.encodeHTML = getInverse(inverseHTML, htmlReplacer); +/** + * Encodes all non-ASCII characters, as well as characters not valid in HTML + * documents using HTML entities. + * + * If a character has no equivalent entity, a + * numeric hexadecimal reference (eg. `ü`) will be used. + */ +exports.encodeNonAsciiHTML = getASCIIEncoder(inverseHTML); +function getInverseObj(obj) { + return Object.keys(obj) + .sort() + .reduce(function (inverse, name) { + inverse[obj[name]] = "&" + name + ";"; + return inverse; + }, {}); +} +function getInverseReplacer(inverse) { + var single = []; + var multiple = []; + for (var _i = 0, _a = Object.keys(inverse); _i < _a.length; _i++) { + var k = _a[_i]; + if (k.length === 1) { + // Add value to single array + single.push("\\" + k); + } + else { + // Add value to multiple array + multiple.push(k); + } + } + // Add ranges to single characters. + single.sort(); + for (var start = 0; start < single.length - 1; start++) { + // Find the end of a run of characters + var end = start; + while (end < single.length - 1 && + single[end].charCodeAt(1) + 1 === single[end + 1].charCodeAt(1)) { + end += 1; + } + var count = 1 + end - start; + // We want to replace at least three characters + if (count < 3) + continue; + single.splice(start, count, single[start] + "-" + single[end]); + } + multiple.unshift("[" + single.join("") + "]"); + return new RegExp(multiple.join("|"), "g"); +} +// /[^\0-\x7F]/gu +var reNonASCII = /(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g; +var getCodePoint = +// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition +String.prototype.codePointAt != null + ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + function (str) { return str.codePointAt(0); } + : // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + function (c) { + return (c.charCodeAt(0) - 0xd800) * 0x400 + + c.charCodeAt(1) - + 0xdc00 + + 0x10000; + }; +function singleCharReplacer(c) { + return "&#x" + (c.length > 1 ? getCodePoint(c) : c.charCodeAt(0)) + .toString(16) + .toUpperCase() + ";"; +} +function getInverse(inverse, re) { + return function (data) { + return data + .replace(re, function (name) { return inverse[name]; }) + .replace(reNonASCII, singleCharReplacer); + }; +} +var reEscapeChars = new RegExp(xmlReplacer.source + "|" + reNonASCII.source, "g"); +/** + * Encodes all non-ASCII characters, as well as characters not valid in XML + * documents using numeric hexadecimal reference (eg. `ü`). + * + * Have a look at `escapeUTF8` if you want a more concise output at the expense + * of reduced transportability. + * + * @param data String to escape. + */ +function escape(data) { + return data.replace(reEscapeChars, singleCharReplacer); +} +exports.escape = escape; +/** + * Encodes all characters not valid in XML documents using numeric hexadecimal + * reference (eg. `ü`). + * + * Note that the output will be character-set dependent. + * + * @param data String to escape. + */ +function escapeUTF8(data) { + return data.replace(xmlReplacer, singleCharReplacer); +} +exports.escapeUTF8 = escapeUTF8; +function getASCIIEncoder(obj) { + return function (data) { + return data.replace(reEscapeChars, function (c) { return obj[c] || singleCharReplacer(c); }); + }; +} + + +/***/ }), + +/***/ 3000: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.encodeHTML5 = exports.encodeHTML4 = exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = void 0; +var decode_1 = __nccwpck_require__(5107); +var encode_1 = __nccwpck_require__(2006); +/** + * Decodes a string with entities. + * + * @param data String to decode. + * @param level Optional level to decode at. 0 = XML, 1 = HTML. Default is 0. + * @deprecated Use `decodeXML` or `decodeHTML` directly. + */ +function decode(data, level) { + return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTML)(data); +} +exports.decode = decode; +/** + * Decodes a string with entities. Does not allow missing trailing semicolons for entities. + * + * @param data String to decode. + * @param level Optional level to decode at. 0 = XML, 1 = HTML. Default is 0. + * @deprecated Use `decodeHTMLStrict` or `decodeXML` directly. + */ +function decodeStrict(data, level) { + return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTMLStrict)(data); +} +exports.decodeStrict = decodeStrict; +/** + * Encodes a string with entities. + * + * @param data String to encode. + * @param level Optional level to encode at. 0 = XML, 1 = HTML. Default is 0. + * @deprecated Use `encodeHTML`, `encodeXML` or `encodeNonAsciiHTML` directly. + */ +function encode(data, level) { + return (!level || level <= 0 ? encode_1.encodeXML : encode_1.encodeHTML)(data); +} +exports.encode = encode; +var encode_2 = __nccwpck_require__(2006); +Object.defineProperty(exports, "encodeXML", ({ enumerable: true, get: function () { return encode_2.encodeXML; } })); +Object.defineProperty(exports, "encodeHTML", ({ enumerable: true, get: function () { return encode_2.encodeHTML; } })); +Object.defineProperty(exports, "encodeNonAsciiHTML", ({ enumerable: true, get: function () { return encode_2.encodeNonAsciiHTML; } })); +Object.defineProperty(exports, "escape", ({ enumerable: true, get: function () { return encode_2.escape; } })); +Object.defineProperty(exports, "escapeUTF8", ({ enumerable: true, get: function () { return encode_2.escapeUTF8; } })); +// Legacy aliases (deprecated) +Object.defineProperty(exports, "encodeHTML4", ({ enumerable: true, get: function () { return encode_2.encodeHTML; } })); +Object.defineProperty(exports, "encodeHTML5", ({ enumerable: true, get: function () { return encode_2.encodeHTML; } })); +var decode_2 = __nccwpck_require__(5107); +Object.defineProperty(exports, "decodeXML", ({ enumerable: true, get: function () { return decode_2.decodeXML; } })); +Object.defineProperty(exports, "decodeHTML", ({ enumerable: true, get: function () { return decode_2.decodeHTML; } })); +Object.defineProperty(exports, "decodeHTMLStrict", ({ enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } })); +// Legacy aliases (deprecated) +Object.defineProperty(exports, "decodeHTML4", ({ enumerable: true, get: function () { return decode_2.decodeHTML; } })); +Object.defineProperty(exports, "decodeHTML5", ({ enumerable: true, get: function () { return decode_2.decodeHTML; } })); +Object.defineProperty(exports, "decodeHTML4Strict", ({ enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } })); +Object.defineProperty(exports, "decodeHTML5Strict", ({ enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } })); +Object.defineProperty(exports, "decodeXMLStrict", ({ enumerable: true, get: function () { return decode_2.decodeXML; } })); + + +/***/ }), + +/***/ 5152: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -module.exports = __nccwpck_require__(54219); +"use strict"; + +//parse Empty Node as self closing node +const buildOptions = __nccwpck_require__(8280).buildOptions; + +const defaultOptions = { + attributeNamePrefix: '@_', + attrNodeName: false, + textNodeName: '#text', + ignoreAttributes: true, + cdataTagName: false, + cdataPositionChar: '\\c', + format: false, + indentBy: ' ', + supressEmptyNode: false, + tagValueProcessor: function(a) { + return a; + }, + attrValueProcessor: function(a) { + return a; + }, +}; + +const props = [ + 'attributeNamePrefix', + 'attrNodeName', + 'textNodeName', + 'ignoreAttributes', + 'cdataTagName', + 'cdataPositionChar', + 'format', + 'indentBy', + 'supressEmptyNode', + 'tagValueProcessor', + 'attrValueProcessor', +]; + +function Parser(options) { + this.options = buildOptions(options, defaultOptions, props); + if (this.options.ignoreAttributes || this.options.attrNodeName) { + this.isAttribute = function(/*a*/) { + return false; + }; + } else { + this.attrPrefixLen = this.options.attributeNamePrefix.length; + this.isAttribute = isAttribute; + } + if (this.options.cdataTagName) { + this.isCDATA = isCDATA; + } else { + this.isCDATA = function(/*a*/) { + return false; + }; + } + this.replaceCDATAstr = replaceCDATAstr; + this.replaceCDATAarr = replaceCDATAarr; + + if (this.options.format) { + this.indentate = indentate; + this.tagEndChar = '>\n'; + this.newLine = '\n'; + } else { + this.indentate = function() { + return ''; + }; + this.tagEndChar = '>'; + this.newLine = ''; + } + + if (this.options.supressEmptyNode) { + this.buildTextNode = buildEmptyTextNode; + this.buildObjNode = buildEmptyObjNode; + } else { + this.buildTextNode = buildTextValNode; + this.buildObjNode = buildObjectNode; + } + + this.buildTextValNode = buildTextValNode; + this.buildObjectNode = buildObjectNode; +} + +Parser.prototype.parse = function(jObj) { + return this.j2x(jObj, 0).val; +}; + +Parser.prototype.j2x = function(jObj, level) { + let attrStr = ''; + let val = ''; + const keys = Object.keys(jObj); + const len = keys.length; + for (let i = 0; i < len; i++) { + const key = keys[i]; + if (typeof jObj[key] === 'undefined') { + // supress undefined node + } else if (jObj[key] === null) { + val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; + } else if (jObj[key] instanceof Date) { + val += this.buildTextNode(jObj[key], key, '', level); + } else if (typeof jObj[key] !== 'object') { + //premitive type + const attr = this.isAttribute(key); + if (attr) { + attrStr += ' ' + attr + '="' + this.options.attrValueProcessor('' + jObj[key]) + '"'; + } else if (this.isCDATA(key)) { + if (jObj[this.options.textNodeName]) { + val += this.replaceCDATAstr(jObj[this.options.textNodeName], jObj[key]); + } else { + val += this.replaceCDATAstr('', jObj[key]); + } + } else { + //tag value + if (key === this.options.textNodeName) { + if (jObj[this.options.cdataTagName]) { + //value will added while processing cdata + } else { + val += this.options.tagValueProcessor('' + jObj[key]); + } + } else { + val += this.buildTextNode(jObj[key], key, '', level); + } + } + } else if (Array.isArray(jObj[key])) { + //repeated nodes + if (this.isCDATA(key)) { + val += this.indentate(level); + if (jObj[this.options.textNodeName]) { + val += this.replaceCDATAarr(jObj[this.options.textNodeName], jObj[key]); + } else { + val += this.replaceCDATAarr('', jObj[key]); + } + } else { + //nested nodes + const arrLen = jObj[key].length; + for (let j = 0; j < arrLen; j++) { + const item = jObj[key][j]; + if (typeof item === 'undefined') { + // supress undefined node + } else if (item === null) { + val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; + } else if (typeof item === 'object') { + const result = this.j2x(item, level + 1); + val += this.buildObjNode(result.val, key, result.attrStr, level); + } else { + val += this.buildTextNode(item, key, '', level); + } + } + } + } else { + //nested node + if (this.options.attrNodeName && key === this.options.attrNodeName) { + const Ks = Object.keys(jObj[key]); + const L = Ks.length; + for (let j = 0; j < L; j++) { + attrStr += ' ' + Ks[j] + '="' + this.options.attrValueProcessor('' + jObj[key][Ks[j]]) + '"'; + } + } else { + const result = this.j2x(jObj[key], level + 1); + val += this.buildObjNode(result.val, key, result.attrStr, level); + } + } + } + return {attrStr: attrStr, val: val}; +}; + +function replaceCDATAstr(str, cdata) { + str = this.options.tagValueProcessor('' + str); + if (this.options.cdataPositionChar === '' || str === '') { + return str + ''); + } + return str + this.newLine; + } +} + +function buildObjectNode(val, key, attrStr, level) { + if (attrStr && !val.includes('<')) { + return ( + this.indentate(level) + + '<' + + key + + attrStr + + '>' + + val + + //+ this.newLine + // + this.indentate(level) + '' + + this.options.tagValueProcessor(val) + + ' { + +"use strict"; + +const char = function(a) { + return String.fromCharCode(a); +}; + +const chars = { + nilChar: char(176), + missingChar: char(201), + nilPremitive: char(175), + missingPremitive: char(200), + + emptyChar: char(178), + emptyValue: char(177), //empty Premitive + + boundryChar: char(179), + + objStart: char(198), + arrStart: char(204), + arrayEnd: char(185), +}; + +const charsArr = [ + chars.nilChar, + chars.nilPremitive, + chars.missingChar, + chars.missingPremitive, + chars.boundryChar, + chars.emptyChar, + chars.emptyValue, + chars.arrayEnd, + chars.objStart, + chars.arrStart, +]; + +const _e = function(node, e_schema, options) { + if (typeof e_schema === 'string') { + //premitive + if (node && node[0] && node[0].val !== undefined) { + return getValue(node[0].val, e_schema); + } else { + return getValue(node, e_schema); + } + } else { + const hasValidData = hasData(node); + if (hasValidData === true) { + let str = ''; + if (Array.isArray(e_schema)) { + //attributes can't be repeated. hence check in children tags only + str += chars.arrStart; + const itemSchema = e_schema[0]; + //var itemSchemaType = itemSchema; + const arr_len = node.length; + + if (typeof itemSchema === 'string') { + for (let arr_i = 0; arr_i < arr_len; arr_i++) { + const r = getValue(node[arr_i].val, itemSchema); + str = processValue(str, r); + } + } else { + for (let arr_i = 0; arr_i < arr_len; arr_i++) { + const r = _e(node[arr_i], itemSchema, options); + str = processValue(str, r); + } + } + str += chars.arrayEnd; //indicates that next item is not array item + } else { + //object + str += chars.objStart; + const keys = Object.keys(e_schema); + if (Array.isArray(node)) { + node = node[0]; + } + for (let i in keys) { + const key = keys[i]; + //a property defined in schema can be present either in attrsMap or children tags + //options.textNodeName will not present in both maps, take it's value from val + //options.attrNodeName will be present in attrsMap + let r; + if (!options.ignoreAttributes && node.attrsMap && node.attrsMap[key]) { + r = _e(node.attrsMap[key], e_schema[key], options); + } else if (key === options.textNodeName) { + r = _e(node.val, e_schema[key], options); + } else { + r = _e(node.child[key], e_schema[key], options); + } + str = processValue(str, r); + } + } + return str; + } else { + return hasValidData; + } + } +}; + +const getValue = function(a /*, type*/) { + switch (a) { + case undefined: + return chars.missingPremitive; + case null: + return chars.nilPremitive; + case '': + return chars.emptyValue; + default: + return a; + } +}; + +const processValue = function(str, r) { + if (!isAppChar(r[0]) && !isAppChar(str[str.length - 1])) { + str += chars.boundryChar; + } + return str + r; +}; + +const isAppChar = function(ch) { + return charsArr.indexOf(ch) !== -1; +}; + +function hasData(jObj) { + if (jObj === undefined) { + return chars.missingChar; + } else if (jObj === null) { + return chars.nilChar; + } else if ( + jObj.child && + Object.keys(jObj.child).length === 0 && + (!jObj.attrsMap || Object.keys(jObj.attrsMap).length === 0) + ) { + return chars.emptyChar; + } else { + return true; + } +} + +const x2j = __nccwpck_require__(6712); +const buildOptions = __nccwpck_require__(8280).buildOptions; + +const convert2nimn = function(node, e_schema, options) { + options = buildOptions(options, x2j.defaultOptions, x2j.props); + return _e(node, e_schema, options); +}; + +exports.convert2nimn = convert2nimn; + + +/***/ }), + +/***/ 8270: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var net = __nccwpck_require__(11631); +const util = __nccwpck_require__(8280); + +const convertToJson = function(node, options, parentTagName) { + const jObj = {}; + + // when no child node or attr is present + if ((!node.child || util.isEmptyObject(node.child)) && (!node.attrsMap || util.isEmptyObject(node.attrsMap))) { + return util.isExist(node.val) ? node.val : ''; + } + + // otherwise create a textnode if node has some text + if (util.isExist(node.val) && !(typeof node.val === 'string' && (node.val === '' || node.val === options.cdataPositionChar))) { + const asArray = util.isTagNameInArrayMode(node.tagname, options.arrayMode, parentTagName) + jObj[options.textNodeName] = asArray ? [node.val] : node.val; + } + + util.merge(jObj, node.attrsMap, options.arrayMode); + + const keys = Object.keys(node.child); + for (let index = 0; index < keys.length; index++) { + const tagName = keys[index]; + if (node.child[tagName] && node.child[tagName].length > 1) { + jObj[tagName] = []; + for (let tag in node.child[tagName]) { + if (node.child[tagName].hasOwnProperty(tag)) { + jObj[tagName].push(convertToJson(node.child[tagName][tag], options, tagName)); + } + } + } else { + const result = convertToJson(node.child[tagName][0], options, tagName); + const asArray = (options.arrayMode === true && typeof result === 'object') || util.isTagNameInArrayMode(tagName, options.arrayMode, parentTagName); + jObj[tagName] = asArray ? [result] : result; + } + } + + //add value + return jObj; +}; + +exports.convertToJson = convertToJson; + + +/***/ }), + +/***/ 6014: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +const util = __nccwpck_require__(8280); +const buildOptions = __nccwpck_require__(8280).buildOptions; +const x2j = __nccwpck_require__(6712); + +//TODO: do it later +const convertToJsonString = function(node, options) { + options = buildOptions(options, x2j.defaultOptions, x2j.props); + + options.indentBy = options.indentBy || ''; + return _cToJsonStr(node, options, 0); +}; + +const _cToJsonStr = function(node, options, level) { + let jObj = '{'; + + //traver through all the children + const keys = Object.keys(node.child); + + for (let index = 0; index < keys.length; index++) { + var tagname = keys[index]; + if (node.child[tagname] && node.child[tagname].length > 1) { + jObj += '"' + tagname + '" : [ '; + for (var tag in node.child[tagname]) { + jObj += _cToJsonStr(node.child[tagname][tag], options) + ' , '; + } + jObj = jObj.substr(0, jObj.length - 1) + ' ] '; //remove extra comma in last + } else { + jObj += '"' + tagname + '" : ' + _cToJsonStr(node.child[tagname][0], options) + ' ,'; + } + } + util.merge(jObj, node.attrsMap); + //add attrsMap as new children + if (util.isEmptyObject(jObj)) { + return util.isExist(node.val) ? node.val : ''; + } else { + if (util.isExist(node.val)) { + if (!(typeof node.val === 'string' && (node.val === '' || node.val === options.cdataPositionChar))) { + jObj += '"' + options.textNodeName + '" : ' + stringval(node.val); + } + } + } + //add value + if (jObj[jObj.length - 1] === ',') { + jObj = jObj.substr(0, jObj.length - 2); + } + return jObj + '}'; +}; + +function stringval(v) { + if (v === true || v === false || !isNaN(v)) { + return v; + } else { + return '"' + v + '"'; + } +} + +function indentate(options, level) { + return options.indentBy.repeat(level); +} + +exports.convertToJsonString = convertToJsonString; + + +/***/ }), + +/***/ 7448: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +const nodeToJson = __nccwpck_require__(8270); +const xmlToNodeobj = __nccwpck_require__(6712); +const x2xmlnode = __nccwpck_require__(6712); +const buildOptions = __nccwpck_require__(8280).buildOptions; +const validator = __nccwpck_require__(1739); + +exports.parse = function(xmlData, options, validationOption) { + if( validationOption){ + if(validationOption === true) validationOption = {} + + const result = validator.validate(xmlData, validationOption); + if (result !== true) { + throw Error( result.err.msg) + } + } + options = buildOptions(options, x2xmlnode.defaultOptions, x2xmlnode.props); + const traversableObj = xmlToNodeobj.getTraversalObj(xmlData, options) + //print(traversableObj, " "); + return nodeToJson.convertToJson(traversableObj, options); +}; +exports.convertTonimn = __nccwpck_require__(1901).convert2nimn; +exports.getTraversalObj = xmlToNodeobj.getTraversalObj; +exports.convertToJson = nodeToJson.convertToJson; +exports.convertToJsonString = __nccwpck_require__(6014).convertToJsonString; +exports.validate = validator.validate; +exports.j2xParser = __nccwpck_require__(5152); +exports.parseToNimn = function(xmlData, schema, options) { + return exports.convertTonimn(exports.getTraversalObj(xmlData, options), schema, options); +}; + + +function print(xmlNode, indentation){ + if(xmlNode){ + console.log(indentation + "{") + console.log(indentation + " \"tagName\": \"" + xmlNode.tagname + "\", "); + if(xmlNode.parent){ + console.log(indentation + " \"parent\": \"" + xmlNode.parent.tagname + "\", "); + } + console.log(indentation + " \"val\": \"" + xmlNode.val + "\", "); + console.log(indentation + " \"attrs\": " + JSON.stringify(xmlNode.attrsMap,null,4) + ", "); + + if(xmlNode.child){ + console.log(indentation + "\"child\": {") + const indentation2 = indentation + indentation; + Object.keys(xmlNode.child).forEach( function(key) { + const node = xmlNode.child[key]; + + if(Array.isArray(node)){ + console.log(indentation + "\""+key+"\" :[") + node.forEach( function(item,index) { + //console.log(indentation + " \""+index+"\" : [") + print(item, indentation2); + }) + console.log(indentation + "],") + }else{ + console.log(indentation + " \""+key+"\" : {") + print(node, indentation2); + console.log(indentation + "},") + } + }); + console.log(indentation + "},") + } + console.log(indentation + "},") + } +} + + +/***/ }), + +/***/ 8280: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +const 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'; +const nameChar = nameStartChar + '\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040'; +const nameRegexp = '[' + nameStartChar + '][' + nameChar + ']*' +const regexName = new RegExp('^' + nameRegexp + '$'); + +const getAllMatches = function(string, regex) { + const matches = []; + let match = regex.exec(string); + while (match) { + const allmatches = []; + const len = match.length; + for (let index = 0; index < len; index++) { + allmatches.push(match[index]); + } + matches.push(allmatches); + match = regex.exec(string); + } + return matches; +}; + +const isName = function(string) { + const match = regexName.exec(string); + return !(match === null || typeof match === 'undefined'); +}; + +exports.isExist = function(v) { + return typeof v !== 'undefined'; +}; + +exports.isEmptyObject = function(obj) { + return Object.keys(obj).length === 0; +}; + +/** + * Copy all the properties of a into b. + * @param {*} target + * @param {*} a + */ +exports.merge = function(target, a, arrayMode) { + if (a) { + const keys = Object.keys(a); // will return an array of own properties + const len = keys.length; //don't make it inline + for (let i = 0; i < len; i++) { + if (arrayMode === 'strict') { + target[keys[i]] = [ a[keys[i]] ]; + } else { + target[keys[i]] = a[keys[i]]; + } + } + } +}; +/* exports.merge =function (b,a){ + return Object.assign(b,a); +} */ + +exports.getValue = function(v) { + if (exports.isExist(v)) { + return v; + } else { + return ''; + } +}; + +// const fakeCall = function(a) {return a;}; +// const fakeCallNoReturn = function() {}; + +exports.buildOptions = function(options, defaultOptions, props) { + var newOptions = {}; + if (!options) { + return defaultOptions; //if there are not options + } + + for (let i = 0; i < props.length; i++) { + if (options[props[i]] !== undefined) { + newOptions[props[i]] = options[props[i]]; + } else { + newOptions[props[i]] = defaultOptions[props[i]]; + } + } + return newOptions; +}; + +/** + * Check if a tag name should be treated as array + * + * @param tagName the node tagname + * @param arrayMode the array mode option + * @param parentTagName the parent tag name + * @returns {boolean} true if node should be parsed as array + */ +exports.isTagNameInArrayMode = function (tagName, arrayMode, parentTagName) { + if (arrayMode === false) { + return false; + } else if (arrayMode instanceof RegExp) { + return arrayMode.test(tagName); + } else if (typeof arrayMode === 'function') { + return !!arrayMode(tagName, parentTagName); + } + + return arrayMode === "strict"; +} + +exports.isName = isName; +exports.getAllMatches = getAllMatches; +exports.nameRegexp = nameRegexp; + + +/***/ }), + +/***/ 1739: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +const util = __nccwpck_require__(8280); + +const defaultOptions = { + allowBooleanAttributes: false, //A tag can have attributes without any value +}; + +const props = ['allowBooleanAttributes']; + +//const tagsPattern = new RegExp("<\\/?([\\w:\\-_\.]+)\\s*\/?>","g"); +exports.validate = function (xmlData, options) { + options = util.buildOptions(options, defaultOptions, props); + + //xmlData = xmlData.replace(/(\r\n|\n|\r)/gm,"");//make it single line + //xmlData = xmlData.replace(/(^\s*<\?xml.*?\?>)/g,"");//Remove XML starting tag + //xmlData = xmlData.replace(/()/g,"");//Remove DOCTYPE + const tags = []; + let tagFound = false; + + //indicates that the root tag has been closed (aka. depth 0 has been reached) + let reachedRoot = false; + + if (xmlData[0] === '\ufeff') { + // check for byte order mark (BOM) + xmlData = xmlData.substr(1); + } + + for (let i = 0; i < xmlData.length; i++) { + + if (xmlData[i] === '<' && xmlData[i+1] === '?') { + i+=2; + i = readPI(xmlData,i); + if (i.err) return i; + }else if (xmlData[i] === '<') { + //starting of tag + //read until you reach to '>' avoiding any '>' in attribute value + + i++; + + if (xmlData[i] === '!') { + i = readCommentAndCDATA(xmlData, i); + continue; + } else { + let closingTag = false; + if (xmlData[i] === '/') { + //closing tag + closingTag = true; + i++; + } + //read tagname + let tagName = ''; + for (; i < xmlData.length && + xmlData[i] !== '>' && + xmlData[i] !== ' ' && + xmlData[i] !== '\t' && + xmlData[i] !== '\n' && + xmlData[i] !== '\r'; i++ + ) { + tagName += xmlData[i]; + } + tagName = tagName.trim(); + //console.log(tagName); + + if (tagName[tagName.length - 1] === '/') { + //self closing tag without attributes + tagName = tagName.substring(0, tagName.length - 1); + //continue; + i--; + } + if (!validateTagName(tagName)) { + let msg; + if (tagName.trim().length === 0) { + msg = "There is an unnecessary space between tag name and backward slash ' 0) { + return getErrorObject('InvalidTag', "Closing tag '"+tagName+"' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, i)); + } else { + const otg = tags.pop(); + if (tagName !== otg) { + return getErrorObject('InvalidTag', "Closing tag '"+otg+"' is expected inplace of '"+tagName+"'.", getLineNumberForPosition(xmlData, i)); + } + + //when there are no more tags, we reached the root level. + if (tags.length == 0) { + reachedRoot = true; + } + } + } else { + const isValid = validateAttributeString(attrStr, options); + if (isValid !== true) { + //the result from the nested function returns the position of the error within the attribute + //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 + //this gives us the absolute index in the entire xml, which we can use to find the line at last + return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line)); + } + + //if the root level has been reached before ... + if (reachedRoot === true) { + return getErrorObject('InvalidXml', 'Multiple possible root nodes found.', getLineNumberForPosition(xmlData, i)); + } else { + tags.push(tagName); + } + tagFound = true; + } + + //skip tag text value + //It may include comments and CDATA value + for (i++; i < xmlData.length; i++) { + if (xmlData[i] === '<') { + if (xmlData[i + 1] === '!') { + //comment or CADATA + i++; + i = readCommentAndCDATA(xmlData, i); + continue; + } else if (xmlData[i+1] === '?') { + i = readPI(xmlData, ++i); + if (i.err) return i; + } else{ + break; + } + } else if (xmlData[i] === '&') { + const afterAmp = validateAmpersand(xmlData, i); + if (afterAmp == -1) + return getErrorObject('InvalidChar', "char '&' is not expected.", getLineNumberForPosition(xmlData, i)); + i = afterAmp; + } + } //end of reading tag text value + if (xmlData[i] === '<') { + i--; + } + } + } else { + if (xmlData[i] === ' ' || xmlData[i] === '\t' || xmlData[i] === '\n' || xmlData[i] === '\r') { + continue; + } + return getErrorObject('InvalidChar', "char '"+xmlData[i]+"' is not expected.", getLineNumberForPosition(xmlData, i)); + } + } + + if (!tagFound) { + return getErrorObject('InvalidXml', 'Start tag expected.', 1); + } else if (tags.length > 0) { + return getErrorObject('InvalidXml', "Invalid '"+JSON.stringify(tags, null, 4).replace(/\r?\n/g, '')+"' found.", 1); + } + + return true; +}; + +/** + * Read Processing insstructions and skip + * @param {*} xmlData + * @param {*} i + */ +function readPI(xmlData, i) { + var start = i; + for (; i < xmlData.length; i++) { + if (xmlData[i] == '?' || xmlData[i] == ' ') { + //tagname + var tagname = xmlData.substr(start, i - start); + if (i > 5 && tagname === 'xml') { + return getErrorObject('InvalidXml', 'XML declaration allowed only at the start of the document.', getLineNumberForPosition(xmlData, i)); + } else if (xmlData[i] == '?' && xmlData[i + 1] == '>') { + //check if valid attribut string + i++; + break; + } else { + continue; + } + } + } + return i; +} + +function readCommentAndCDATA(xmlData, i) { + if (xmlData.length > i + 5 && xmlData[i + 1] === '-' && xmlData[i + 2] === '-') { + //comment + for (i += 3; i < xmlData.length; i++) { + if (xmlData[i] === '-' && xmlData[i + 1] === '-' && xmlData[i + 2] === '>') { + i += 2; + break; + } + } + } else if ( + xmlData.length > i + 8 && + xmlData[i + 1] === 'D' && + xmlData[i + 2] === 'O' && + xmlData[i + 3] === 'C' && + xmlData[i + 4] === 'T' && + xmlData[i + 5] === 'Y' && + xmlData[i + 6] === 'P' && + xmlData[i + 7] === 'E' + ) { + let angleBracketsCount = 1; + for (i += 8; i < xmlData.length; i++) { + if (xmlData[i] === '<') { + angleBracketsCount++; + } else if (xmlData[i] === '>') { + angleBracketsCount--; + if (angleBracketsCount === 0) { + break; + } + } + } + } else if ( + xmlData.length > i + 9 && + xmlData[i + 1] === '[' && + xmlData[i + 2] === 'C' && + xmlData[i + 3] === 'D' && + xmlData[i + 4] === 'A' && + xmlData[i + 5] === 'T' && + xmlData[i + 6] === 'A' && + xmlData[i + 7] === '[' + ) { + for (i += 8; i < xmlData.length; i++) { + if (xmlData[i] === ']' && xmlData[i + 1] === ']' && xmlData[i + 2] === '>') { + i += 2; + break; + } + } + } + + return i; +} + +var doubleQuote = '"'; +var singleQuote = "'"; + +/** + * Keep reading xmlData until '<' is found outside the attribute value. + * @param {string} xmlData + * @param {number} i + */ +function readAttributeStr(xmlData, i) { + let attrStr = ''; + let startChar = ''; + let tagClosed = false; + for (; i < xmlData.length; i++) { + if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) { + if (startChar === '') { + startChar = xmlData[i]; + } else if (startChar !== xmlData[i]) { + //if vaue is enclosed with double quote then single quotes are allowed inside the value and vice versa + continue; + } else { + startChar = ''; + } + } else if (xmlData[i] === '>') { + if (startChar === '') { + tagClosed = true; + break; + } + } + attrStr += xmlData[i]; + } + if (startChar !== '') { + return false; + } + + return { + value: attrStr, + index: i, + tagClosed: tagClosed + }; +} + +/** + * Select all the attributes whether valid or invalid. + */ +const validAttrStrRegxp = new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?', 'g'); + +//attr, ="sd", a="amit's", a="sd"b="saf", ab cd="" + +function validateAttributeString(attrStr, options) { + //console.log("start:"+attrStr+":end"); + + //if(attrStr.trim().length === 0) return true; //empty string + + const matches = util.getAllMatches(attrStr, validAttrStrRegxp); + const attrNames = {}; + + for (let i = 0; i < matches.length; i++) { + if (matches[i][1].length === 0) { + //nospace before attribute name: a="sd"b="saf" + return getErrorObject('InvalidAttr', "Attribute '"+matches[i][2]+"' has no space in starting.", getPositionFromMatch(attrStr, matches[i][0])) + } else if (matches[i][3] === undefined && !options.allowBooleanAttributes) { + //independent attribute: ab + return getErrorObject('InvalidAttr', "boolean attribute '"+matches[i][2]+"' is not allowed.", getPositionFromMatch(attrStr, matches[i][0])); + } + /* else if(matches[i][6] === undefined){//attribute without value: ab= + return { err: { code:"InvalidAttr",msg:"attribute " + matches[i][2] + " has no value assigned."}}; + } */ + const attrName = matches[i][2]; + if (!validateAttrName(attrName)) { + return getErrorObject('InvalidAttr', "Attribute '"+attrName+"' is an invalid name.", getPositionFromMatch(attrStr, matches[i][0])); + } + if (!attrNames.hasOwnProperty(attrName)) { + //check for duplicate attribute. + attrNames[attrName] = 1; + } else { + return getErrorObject('InvalidAttr', "Attribute '"+attrName+"' is repeated.", getPositionFromMatch(attrStr, matches[i][0])); + } + } + + return true; +} + +function validateNumberAmpersand(xmlData, i) { + let re = /\d/; + if (xmlData[i] === 'x') { + i++; + re = /[\da-fA-F]/; + } + for (; i < xmlData.length; i++) { + if (xmlData[i] === ';') + return i; + if (!xmlData[i].match(re)) + break; + } + return -1; +} + +function validateAmpersand(xmlData, i) { + // https://www.w3.org/TR/xml/#dt-charref + i++; + if (xmlData[i] === ';') + return -1; + if (xmlData[i] === '#') { + i++; + return validateNumberAmpersand(xmlData, i); + } + let count = 0; + for (; i < xmlData.length; i++, count++) { + if (xmlData[i].match(/\w/) && count < 20) + continue; + if (xmlData[i] === ';') + break; + return -1; + } + return i; +} + +function getErrorObject(code, message, lineNumber) { + return { + err: { + code: code, + msg: message, + line: lineNumber, + }, + }; +} + +function validateAttrName(attrName) { + return util.isName(attrName); +} + +// const startsWithXML = /^xml/i; + +function validateTagName(tagname) { + return util.isName(tagname) /* && !tagname.match(startsWithXML) */; +} + +//this function returns the line number for the character at the given index +function getLineNumberForPosition(xmlData, index) { + var lines = xmlData.substring(0, index).split(/\r?\n/); + return lines.length; +} + +//this function returns the position of the last character of match within attrStr +function getPositionFromMatch(attrStr, match) { + return attrStr.indexOf(match) + match.length; +} + + +/***/ }), + +/***/ 9539: +/***/ ((module) => { + +"use strict"; + + +module.exports = function(tagname, parent, val) { + this.tagname = tagname; + this.parent = parent; + this.child = {}; //child tags + this.attrsMap = {}; //attributes map + this.val = val; //text only + this.addChild = function(child) { + if (Array.isArray(this.child[child.tagname])) { + //already presents + this.child[child.tagname].push(child); + } else { + this.child[child.tagname] = [child]; + } + }; +}; + + +/***/ }), + +/***/ 6712: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +const util = __nccwpck_require__(8280); +const buildOptions = __nccwpck_require__(8280).buildOptions; +const xmlNode = __nccwpck_require__(9539); +const regx = + '<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)' + .replace(/NAME/g, util.nameRegexp); + +//const tagsRegx = new RegExp("<(\\/?[\\w:\\-\._]+)([^>]*)>(\\s*"+cdataRegx+")*([^<]+)?","g"); +//const tagsRegx = new RegExp("<(\\/?)((\\w*:)?([\\w:\\-\._]+))([^>]*)>([^<]*)("+cdataRegx+"([^<]*))*([^<]+)?","g"); + +//polyfill +if (!Number.parseInt && window.parseInt) { + Number.parseInt = window.parseInt; +} +if (!Number.parseFloat && window.parseFloat) { + Number.parseFloat = window.parseFloat; +} + +const defaultOptions = { + attributeNamePrefix: '@_', + attrNodeName: false, + textNodeName: '#text', + ignoreAttributes: true, + ignoreNameSpace: false, + allowBooleanAttributes: false, //a tag can have attributes without any value + //ignoreRootElement : false, + parseNodeValue: true, + parseAttributeValue: false, + arrayMode: false, + trimValues: true, //Trim string values of tag and attributes + cdataTagName: false, + cdataPositionChar: '\\c', + tagValueProcessor: function(a, tagName) { + return a; + }, + attrValueProcessor: function(a, attrName) { + return a; + }, + stopNodes: [] + //decodeStrict: false, +}; + +exports.defaultOptions = defaultOptions; + +const props = [ + 'attributeNamePrefix', + 'attrNodeName', + 'textNodeName', + 'ignoreAttributes', + 'ignoreNameSpace', + 'allowBooleanAttributes', + 'parseNodeValue', + 'parseAttributeValue', + 'arrayMode', + 'trimValues', + 'cdataTagName', + 'cdataPositionChar', + 'tagValueProcessor', + 'attrValueProcessor', + 'parseTrueNumberOnly', + 'stopNodes' +]; +exports.props = props; + +/** + * Trim -> valueProcessor -> parse value + * @param {string} tagName + * @param {string} val + * @param {object} options + */ +function processTagValue(tagName, val, options) { + if (val) { + if (options.trimValues) { + val = val.trim(); + } + val = options.tagValueProcessor(val, tagName); + val = parseValue(val, options.parseNodeValue, options.parseTrueNumberOnly); + } + + return val; +} + +function resolveNameSpace(tagname, options) { + if (options.ignoreNameSpace) { + const tags = tagname.split(':'); + const prefix = tagname.charAt(0) === '/' ? '/' : ''; + if (tags[0] === 'xmlns') { + return ''; + } + if (tags.length === 2) { + tagname = prefix + tags[1]; + } + } + return tagname; +} + +function parseValue(val, shouldParse, parseTrueNumberOnly) { + if (shouldParse && typeof val === 'string') { + let parsed; + if (val.trim() === '' || isNaN(val)) { + parsed = val === 'true' ? true : val === 'false' ? false : val; + } else { + if (val.indexOf('0x') !== -1) { + //support hexa decimal + parsed = Number.parseInt(val, 16); + } else if (val.indexOf('.') !== -1) { + parsed = Number.parseFloat(val); + val = val.replace(/\.?0+$/, ""); + } else { + parsed = Number.parseInt(val, 10); + } + if (parseTrueNumberOnly) { + parsed = String(parsed) === val ? parsed : val; + } + } + return parsed; + } else { + if (util.isExist(val)) { + return val; + } else { + return ''; + } + } +} + +//TODO: change regex to capture NS +//const attrsRegx = new RegExp("([\\w\\-\\.\\:]+)\\s*=\\s*(['\"])((.|\n)*?)\\2","gm"); +const attrsRegx = new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])(.*?)\\3)?', 'g'); + +function buildAttributesMap(attrStr, options) { + if (!options.ignoreAttributes && typeof attrStr === 'string') { + attrStr = attrStr.replace(/\r?\n/g, ' '); + //attrStr = attrStr || attrStr.trim(); + + const matches = util.getAllMatches(attrStr, attrsRegx); + const len = matches.length; //don't make it inline + const attrs = {}; + for (let i = 0; i < len; i++) { + const attrName = resolveNameSpace(matches[i][1], options); + if (attrName.length) { + if (matches[i][4] !== undefined) { + if (options.trimValues) { + matches[i][4] = matches[i][4].trim(); + } + matches[i][4] = options.attrValueProcessor(matches[i][4], attrName); + attrs[options.attributeNamePrefix + attrName] = parseValue( + matches[i][4], + options.parseAttributeValue, + options.parseTrueNumberOnly + ); + } else if (options.allowBooleanAttributes) { + attrs[options.attributeNamePrefix + attrName] = true; + } + } + } + if (!Object.keys(attrs).length) { + return; + } + if (options.attrNodeName) { + const attrCollection = {}; + attrCollection[options.attrNodeName] = attrs; + return attrCollection; + } + return attrs; + } +} + +const getTraversalObj = function(xmlData, options) { + xmlData = xmlData.replace(/\r\n?/g, "\n"); + options = buildOptions(options, defaultOptions, props); + const xmlObj = new xmlNode('!xml'); + let currentNode = xmlObj; + let textData = ""; + +//function match(xmlData){ + for(let i=0; i< xmlData.length; i++){ + const ch = xmlData[i]; + if(ch === '<'){ + if( xmlData[i+1] === '/') {//Closing Tag + const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed.") + let tagName = xmlData.substring(i+2,closeIndex).trim(); + + if(options.ignoreNameSpace){ + const colonIndex = tagName.indexOf(":"); + if(colonIndex !== -1){ + tagName = tagName.substr(colonIndex+1); + } + } + + /* if (currentNode.parent) { + currentNode.parent.val = util.getValue(currentNode.parent.val) + '' + processTagValue2(tagName, textData , options); + } */ + if(currentNode){ + if(currentNode.val){ + currentNode.val = util.getValue(currentNode.val) + '' + processTagValue(tagName, textData , options); + }else{ + currentNode.val = processTagValue(tagName, textData , options); + } + } + + if (options.stopNodes.length && options.stopNodes.includes(currentNode.tagname)) { + currentNode.child = [] + if (currentNode.attrsMap == undefined) { currentNode.attrsMap = {}} + currentNode.val = xmlData.substr(currentNode.startIndex + 1, i - currentNode.startIndex - 1) + } + currentNode = currentNode.parent; + textData = ""; + i = closeIndex; + } else if( xmlData[i+1] === '?') { + i = findClosingIndex(xmlData, "?>", i, "Pi Tag is not closed.") + } else if(xmlData.substr(i + 1, 3) === '!--') { + i = findClosingIndex(xmlData, "-->", i, "Comment is not closed.") + } else if( xmlData.substr(i + 1, 2) === '!D') { + const closeIndex = findClosingIndex(xmlData, ">", i, "DOCTYPE is not closed.") + const tagExp = xmlData.substring(i, closeIndex); + if(tagExp.indexOf("[") >= 0){ + i = xmlData.indexOf("]>", i) + 1; + }else{ + i = closeIndex; + } + }else if(xmlData.substr(i + 1, 2) === '![') { + const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2 + const tagExp = xmlData.substring(i + 9,closeIndex); + + //considerations + //1. CDATA will always have parent node + //2. A tag with CDATA is not a leaf node so it's value would be string type. + if(textData){ + currentNode.val = util.getValue(currentNode.val) + '' + processTagValue(currentNode.tagname, textData , options); + textData = ""; + } + + if (options.cdataTagName) { + //add cdata node + const childNode = new xmlNode(options.cdataTagName, currentNode, tagExp); + currentNode.addChild(childNode); + //for backtracking + currentNode.val = util.getValue(currentNode.val) + options.cdataPositionChar; + //add rest value to parent node + if (tagExp) { + childNode.val = tagExp; + } + } else { + currentNode.val = (currentNode.val || '') + (tagExp || ''); + } + + i = closeIndex + 2; + }else {//Opening tag + const result = closingIndexForOpeningTag(xmlData, i+1) + let tagExp = result.data; + const closeIndex = result.index; + const separatorIndex = tagExp.indexOf(" "); + let tagName = tagExp; + let shouldBuildAttributesMap = true; + if(separatorIndex !== -1){ + tagName = tagExp.substr(0, separatorIndex).replace(/\s\s*$/, ''); + tagExp = tagExp.substr(separatorIndex + 1); + } + + if(options.ignoreNameSpace){ + const colonIndex = tagName.indexOf(":"); + if(colonIndex !== -1){ + tagName = tagName.substr(colonIndex+1); + shouldBuildAttributesMap = tagName !== result.data.substr(colonIndex + 1); + } + } + + //save text to parent node + if (currentNode && textData) { + if(currentNode.tagname !== '!xml'){ + currentNode.val = util.getValue(currentNode.val) + '' + processTagValue( currentNode.tagname, textData, options); + } + } + + if(tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1){//selfClosing tag + + if(tagName[tagName.length - 1] === "/"){ //remove trailing '/' + tagName = tagName.substr(0, tagName.length - 1); + tagExp = tagName; + }else{ + tagExp = tagExp.substr(0, tagExp.length - 1); + } + + const childNode = new xmlNode(tagName, currentNode, ''); + if(tagName !== tagExp){ + childNode.attrsMap = buildAttributesMap(tagExp, options); + } + currentNode.addChild(childNode); + }else{//opening tag + + const childNode = new xmlNode( tagName, currentNode ); + if (options.stopNodes.length && options.stopNodes.includes(childNode.tagname)) { + childNode.startIndex=closeIndex; + } + if(tagName !== tagExp && shouldBuildAttributesMap){ + childNode.attrsMap = buildAttributesMap(tagExp, options); + } + currentNode.addChild(childNode); + currentNode = childNode; + } + textData = ""; + i = closeIndex; + } + }else{ + textData += xmlData[i]; + } + } + return xmlObj; +} + +function closingIndexForOpeningTag(data, i){ + let attrBoundary; + let tagExp = ""; + for (let index = i; index < data.length; index++) { + let ch = data[index]; + if (attrBoundary) { + if (ch === attrBoundary) attrBoundary = "";//reset + } else if (ch === '"' || ch === "'") { + attrBoundary = ch; + } else if (ch === '>') { + return { + data: tagExp, + index: index + } + } else if (ch === '\t') { + ch = " " + } + tagExp += ch; + } +} + +function findClosingIndex(xmlData, str, i, errMsg){ + const closingIndex = xmlData.indexOf(str, i); + if(closingIndex === -1){ + throw new Error(errMsg) + }else{ + return closingIndex + str.length - 1; + } +} + +exports.getTraversalObj = getTraversalObj; + + +/***/ }), + +/***/ 4351: +/***/ ((module) => { + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __createBinding; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + + __extends = function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + /** @deprecated */ + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __spreadArray = function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + 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); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); + + +/***/ }), + +/***/ 4294: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = __nccwpck_require__(4219); + + +/***/ }), + +/***/ 4219: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var net = __nccwpck_require__(1631); var tls = __nccwpck_require__(4016); -var http = __nccwpck_require__(98605); -var https = __nccwpck_require__(57211); -var events = __nccwpck_require__(28614); -var assert = __nccwpck_require__(42357); -var util = __nccwpck_require__(31669); +var http = __nccwpck_require__(8605); +var https = __nccwpck_require__(7211); +var events = __nccwpck_require__(8614); +var assert = __nccwpck_require__(2357); +var util = __nccwpck_require__(1669); exports.httpOverHttp = httpOverHttp; @@ -31782,10603 +30553,693 @@ exports.debug = debug; // for test /***/ }), -/***/ 2155: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 5840: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -var v1 = __nccwpck_require__(18749); -var v4 = __nccwpck_require__(80824); +"use strict"; -var uuid = v4; -uuid.v1 = v1; -uuid.v4 = v4; -module.exports = uuid; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +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, "NIL", ({ + enumerable: true, + get: function () { + return _nil.default; + } +})); +Object.defineProperty(exports, "version", ({ + enumerable: true, + get: function () { + return _version.default; + } +})); +Object.defineProperty(exports, "validate", ({ + enumerable: true, + get: function () { + return _validate.default; + } +})); +Object.defineProperty(exports, "stringify", ({ + enumerable: true, + get: function () { + return _stringify.default; + } +})); +Object.defineProperty(exports, "parse", ({ + enumerable: true, + get: function () { + return _parse.default; + } +})); +var _v = _interopRequireDefault(__nccwpck_require__(8628)); + +var _v2 = _interopRequireDefault(__nccwpck_require__(6409)); + +var _v3 = _interopRequireDefault(__nccwpck_require__(5122)); + +var _v4 = _interopRequireDefault(__nccwpck_require__(9120)); + +var _nil = _interopRequireDefault(__nccwpck_require__(5332)); + +var _version = _interopRequireDefault(__nccwpck_require__(2414)); + +var _validate = _interopRequireDefault(__nccwpck_require__(6900)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(8950)); + +var _parse = _interopRequireDefault(__nccwpck_require__(2746)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), -/***/ 92707: -/***/ ((module) => { +/***/ 4569: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = void 0; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6417)); + +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 _crypto.default.createHash('md5').update(bytes).digest(); +} + +var _default = md5; +exports.default = _default; + +/***/ }), + +/***/ 5332: +/***/ ((__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; + +/***/ }), + +/***/ 2746: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(6900)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function parse(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + 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; + +/***/ }), + +/***/ 814: +/***/ ((__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; + +/***/ }), + +/***/ 807: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = rng; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6417)); + +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); +} + +/***/ }), + +/***/ 5274: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = void 0; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6417)); + +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; + +/***/ }), + +/***/ 8950: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(6900)); + +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 */ -var byteToHex = []; -for (var i = 0; i < 256; ++i) { - byteToHex[i] = (i + 0x100).toString(16).substr(1); +const byteToHex = []; + +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).substr(1)); } -function bytesToUuid(buf, offset) { - var i = offset || 0; - var bth = byteToHex; - // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 - return ([bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]]]).join(''); +function stringify(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 + 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 + // 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; } -module.exports = bytesToUuid; - +var _default = stringify; +exports.default = _default; /***/ }), -/***/ 15859: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 8628: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -// Unique ID creation requires a high quality random # generator. In node.js -// this is pretty straight-forward - we use the crypto API. - -var crypto = __nccwpck_require__(76417); - -module.exports = function nodeRNG() { - return crypto.randomBytes(16); -}; +"use strict"; -/***/ }), +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = void 0; -/***/ 18749: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +var _rng = _interopRequireDefault(__nccwpck_require__(807)); -var rng = __nccwpck_require__(15859); -var bytesToUuid = __nccwpck_require__(92707); +var _stringify = _interopRequireDefault(__nccwpck_require__(8950)); + +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; -var _nodeId; -var _clockseq; +let _clockseq; // Previous uuid creation time -// Previous uuid creation time -var _lastMSecs = 0; -var _lastNSecs = 0; -// See https://github.com/broofa/node-uuid for API details +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + function v1(options, buf, offset) { - var i = buf && offset || 0; - var b = buf || []; - + let i = buf && offset || 0; + const b = buf || new Array(16); options = options || {}; - var node = options.node || _nodeId; - var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; - - // node and clockseq need to be initialized to random values if they're not + 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) { - var seedBytes = rng(); + 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] - ]; + 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, + } // 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. - var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); - // Per 4.2.1.2, use count of uuid's generated during the current clock + + 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 - var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; - // Time since last uuid creation (in msecs) - var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; + 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 - // 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 + } // 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 + - // 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'); + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); } _lastMSecs = msecs; _lastNSecs = nsecs; - _clockseq = clockseq; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - msecs += 12219292800000; + msecs += 12219292800000; // `time_low` - // `time_low` - var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + 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; + b[i++] = tl & 0xff; // `time_mid` - // `time_mid` - var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` - // `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; + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - // `clock_seq_low` - b[i++] = clockseq & 0xff; + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - // `node` - for (var n = 0; n < 6; ++n) { + b[i++] = clockseq & 0xff; // `node` + + for (let n = 0; n < 6; ++n) { b[i + n] = node[n]; } - return buf ? buf : bytesToUuid(b); + return buf || (0, _stringify.default)(b); } -module.exports = v1; - +var _default = v1; +exports.default = _default; /***/ }), -/***/ 80824: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var rng = __nccwpck_require__(15859); -var bytesToUuid = __nccwpck_require__(92707); - -function v4(options, buf, offset) { - var i = buf && offset || 0; - - if (typeof(options) == 'string') { - buf = options === 'binary' ? new Array(16) : null; - options = null; - } - options = options || {}; - - var rnds = options.random || (options.rng || rng)(); - - // 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) { - for (var ii = 0; ii < 16; ++ii) { - buf[i + ii] = rnds[ii]; - } - } - - return buf || bytesToUuid(rnds); -} - -module.exports = v4; - - -/***/ }), - -/***/ 22624: -/***/ (function(__unused_webpack_module, exports) { - -// Generated by CoffeeScript 1.12.7 -(function() { - "use strict"; - exports.stripBOM = function(str) { - if (str[0] === '\uFEFF') { - return str.substring(1); - } else { - return str; - } - }; - -}).call(this); - - -/***/ }), - -/***/ 43337: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -// Generated by CoffeeScript 1.12.7 -(function() { - "use strict"; - var builder, defaults, escapeCDATA, requiresCDATA, wrapCDATA, - hasProp = {}.hasOwnProperty; - - builder = __nccwpck_require__(52958); - - defaults = __nccwpck_require__(97251).defaults; - - requiresCDATA = function(entry) { - return typeof entry === "string" && (entry.indexOf('&') >= 0 || entry.indexOf('>') >= 0 || entry.indexOf('<') >= 0); - }; - - wrapCDATA = function(entry) { - return ""; - }; - - escapeCDATA = function(entry) { - return entry.replace(']]>', ']]]]>'); - }; - - exports.Builder = (function() { - function Builder(opts) { - var key, ref, value; - this.options = {}; - ref = defaults["0.2"]; - for (key in ref) { - if (!hasProp.call(ref, key)) continue; - value = ref[key]; - this.options[key] = value; - } - for (key in opts) { - if (!hasProp.call(opts, key)) continue; - value = opts[key]; - this.options[key] = value; - } - } - - Builder.prototype.buildObject = function(rootObj) { - var attrkey, charkey, render, rootElement, rootName; - attrkey = this.options.attrkey; - charkey = this.options.charkey; - if ((Object.keys(rootObj).length === 1) && (this.options.rootName === defaults['0.2'].rootName)) { - rootName = Object.keys(rootObj)[0]; - rootObj = rootObj[rootName]; - } else { - rootName = this.options.rootName; - } - render = (function(_this) { - return function(element, obj) { - var attr, child, entry, index, key, value; - if (typeof obj !== 'object') { - if (_this.options.cdata && requiresCDATA(obj)) { - element.raw(wrapCDATA(obj)); - } else { - element.txt(obj); - } - } else if (Array.isArray(obj)) { - for (index in obj) { - if (!hasProp.call(obj, index)) continue; - child = obj[index]; - for (key in child) { - entry = child[key]; - element = render(element.ele(key), entry).up(); - } - } - } else { - for (key in obj) { - if (!hasProp.call(obj, key)) continue; - child = obj[key]; - if (key === attrkey) { - if (typeof child === "object") { - for (attr in child) { - value = child[attr]; - element = element.att(attr, value); - } - } - } else if (key === charkey) { - if (_this.options.cdata && requiresCDATA(child)) { - element = element.raw(wrapCDATA(child)); - } else { - element = element.txt(child); - } - } else if (Array.isArray(child)) { - for (index in child) { - if (!hasProp.call(child, index)) continue; - entry = child[index]; - if (typeof entry === 'string') { - if (_this.options.cdata && requiresCDATA(entry)) { - element = element.ele(key).raw(wrapCDATA(entry)).up(); - } else { - element = element.ele(key, entry).up(); - } - } else { - element = render(element.ele(key), entry).up(); - } - } - } else if (typeof child === "object") { - element = render(element.ele(key), child).up(); - } else { - if (typeof child === 'string' && _this.options.cdata && requiresCDATA(child)) { - element = element.ele(key).raw(wrapCDATA(child)).up(); - } else { - if (child == null) { - child = ''; - } - element = element.ele(key, child.toString()).up(); - } - } - } - } - return element; - }; - })(this); - rootElement = builder.create(rootName, this.options.xmldec, this.options.doctype, { - headless: this.options.headless, - allowSurrogateChars: this.options.allowSurrogateChars - }); - return render(rootElement, rootObj).end(this.options.renderOpts); - }; - - return Builder; - - })(); - -}).call(this); - - -/***/ }), - -/***/ 97251: -/***/ (function(__unused_webpack_module, exports) { - -// Generated by CoffeeScript 1.12.7 -(function() { - exports.defaults = { - "0.1": { - explicitCharkey: false, - trim: true, - normalize: true, - normalizeTags: false, - attrkey: "@", - charkey: "#", - explicitArray: false, - ignoreAttrs: false, - mergeAttrs: false, - explicitRoot: false, - validator: null, - xmlns: false, - explicitChildren: false, - childkey: '@@', - charsAsChildren: false, - includeWhiteChars: false, - async: false, - strict: true, - attrNameProcessors: null, - attrValueProcessors: null, - tagNameProcessors: null, - valueProcessors: null, - emptyTag: '' - }, - "0.2": { - explicitCharkey: false, - trim: false, - normalize: false, - normalizeTags: false, - attrkey: "$", - charkey: "_", - explicitArray: true, - ignoreAttrs: false, - mergeAttrs: false, - explicitRoot: true, - validator: null, - xmlns: false, - explicitChildren: false, - preserveChildrenOrder: false, - childkey: '$$', - charsAsChildren: false, - includeWhiteChars: false, - async: false, - strict: true, - attrNameProcessors: null, - attrValueProcessors: null, - tagNameProcessors: null, - valueProcessors: null, - rootName: 'root', - xmldec: { - 'version': '1.0', - 'encoding': 'UTF-8', - 'standalone': true - }, - doctype: null, - renderOpts: { - 'pretty': true, - 'indent': ' ', - 'newline': '\n' - }, - headless: false, - chunkSize: 10000, - emptyTag: '', - cdata: false - } - }; - -}).call(this); - - -/***/ }), - -/***/ 83314: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -// Generated by CoffeeScript 1.12.7 -(function() { - "use strict"; - var bom, defaults, events, isEmpty, processItem, processors, sax, setImmediate, - bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - - sax = __nccwpck_require__(41695); - - events = __nccwpck_require__(28614); - - bom = __nccwpck_require__(22624); - - processors = __nccwpck_require__(99236); - - setImmediate = __nccwpck_require__(78213).setImmediate; - - defaults = __nccwpck_require__(97251).defaults; - - isEmpty = function(thing) { - return typeof thing === "object" && (thing != null) && Object.keys(thing).length === 0; - }; - - processItem = function(processors, item, key) { - var i, len, process; - for (i = 0, len = processors.length; i < len; i++) { - process = processors[i]; - item = process(item, key); - } - return item; - }; - - exports.Parser = (function(superClass) { - extend(Parser, superClass); - - function Parser(opts) { - this.parseString = bind(this.parseString, this); - this.reset = bind(this.reset, this); - this.assignOrPush = bind(this.assignOrPush, this); - this.processAsync = bind(this.processAsync, this); - var key, ref, value; - if (!(this instanceof exports.Parser)) { - return new exports.Parser(opts); - } - this.options = {}; - ref = defaults["0.2"]; - for (key in ref) { - if (!hasProp.call(ref, key)) continue; - value = ref[key]; - this.options[key] = value; - } - for (key in opts) { - if (!hasProp.call(opts, key)) continue; - value = opts[key]; - this.options[key] = value; - } - if (this.options.xmlns) { - this.options.xmlnskey = this.options.attrkey + "ns"; - } - if (this.options.normalizeTags) { - if (!this.options.tagNameProcessors) { - this.options.tagNameProcessors = []; - } - this.options.tagNameProcessors.unshift(processors.normalize); - } - this.reset(); - } - - Parser.prototype.processAsync = function() { - var chunk, err; - try { - if (this.remaining.length <= this.options.chunkSize) { - chunk = this.remaining; - this.remaining = ''; - this.saxParser = this.saxParser.write(chunk); - return this.saxParser.close(); - } else { - chunk = this.remaining.substr(0, this.options.chunkSize); - this.remaining = this.remaining.substr(this.options.chunkSize, this.remaining.length); - this.saxParser = this.saxParser.write(chunk); - return setImmediate(this.processAsync); - } - } catch (error1) { - err = error1; - if (!this.saxParser.errThrown) { - this.saxParser.errThrown = true; - return this.emit(err); - } - } - }; - - Parser.prototype.assignOrPush = function(obj, key, newValue) { - if (!(key in obj)) { - if (!this.options.explicitArray) { - return obj[key] = newValue; - } else { - return obj[key] = [newValue]; - } - } else { - if (!(obj[key] instanceof Array)) { - obj[key] = [obj[key]]; - } - return obj[key].push(newValue); - } - }; - - Parser.prototype.reset = function() { - var attrkey, charkey, ontext, stack; - this.removeAllListeners(); - this.saxParser = sax.parser(this.options.strict, { - trim: false, - normalize: false, - xmlns: this.options.xmlns - }); - this.saxParser.errThrown = false; - this.saxParser.onerror = (function(_this) { - return function(error) { - _this.saxParser.resume(); - if (!_this.saxParser.errThrown) { - _this.saxParser.errThrown = true; - return _this.emit("error", error); - } - }; - })(this); - this.saxParser.onend = (function(_this) { - return function() { - if (!_this.saxParser.ended) { - _this.saxParser.ended = true; - return _this.emit("end", _this.resultObject); - } - }; - })(this); - this.saxParser.ended = false; - this.EXPLICIT_CHARKEY = this.options.explicitCharkey; - this.resultObject = null; - stack = []; - attrkey = this.options.attrkey; - charkey = this.options.charkey; - this.saxParser.onopentag = (function(_this) { - return function(node) { - var key, newValue, obj, processedKey, ref; - obj = {}; - obj[charkey] = ""; - if (!_this.options.ignoreAttrs) { - ref = node.attributes; - for (key in ref) { - if (!hasProp.call(ref, key)) continue; - if (!(attrkey in obj) && !_this.options.mergeAttrs) { - obj[attrkey] = {}; - } - newValue = _this.options.attrValueProcessors ? processItem(_this.options.attrValueProcessors, node.attributes[key], key) : node.attributes[key]; - processedKey = _this.options.attrNameProcessors ? processItem(_this.options.attrNameProcessors, key) : key; - if (_this.options.mergeAttrs) { - _this.assignOrPush(obj, processedKey, newValue); - } else { - obj[attrkey][processedKey] = newValue; - } - } - } - obj["#name"] = _this.options.tagNameProcessors ? processItem(_this.options.tagNameProcessors, node.name) : node.name; - if (_this.options.xmlns) { - obj[_this.options.xmlnskey] = { - uri: node.uri, - local: node.local - }; - } - return stack.push(obj); - }; - })(this); - this.saxParser.onclosetag = (function(_this) { - return function() { - var cdata, emptyStr, key, node, nodeName, obj, objClone, old, s, xpath; - obj = stack.pop(); - nodeName = obj["#name"]; - if (!_this.options.explicitChildren || !_this.options.preserveChildrenOrder) { - delete obj["#name"]; - } - if (obj.cdata === true) { - cdata = obj.cdata; - delete obj.cdata; - } - s = stack[stack.length - 1]; - if (obj[charkey].match(/^\s*$/) && !cdata) { - emptyStr = obj[charkey]; - delete obj[charkey]; - } else { - if (_this.options.trim) { - obj[charkey] = obj[charkey].trim(); - } - if (_this.options.normalize) { - obj[charkey] = obj[charkey].replace(/\s{2,}/g, " ").trim(); - } - obj[charkey] = _this.options.valueProcessors ? processItem(_this.options.valueProcessors, obj[charkey], nodeName) : obj[charkey]; - if (Object.keys(obj).length === 1 && charkey in obj && !_this.EXPLICIT_CHARKEY) { - obj = obj[charkey]; - } - } - if (isEmpty(obj)) { - obj = _this.options.emptyTag !== '' ? _this.options.emptyTag : emptyStr; - } - if (_this.options.validator != null) { - xpath = "/" + ((function() { - var i, len, results; - results = []; - for (i = 0, len = stack.length; i < len; i++) { - node = stack[i]; - results.push(node["#name"]); - } - return results; - })()).concat(nodeName).join("/"); - (function() { - var err; - try { - return obj = _this.options.validator(xpath, s && s[nodeName], obj); - } catch (error1) { - err = error1; - return _this.emit("error", err); - } - })(); - } - if (_this.options.explicitChildren && !_this.options.mergeAttrs && typeof obj === 'object') { - if (!_this.options.preserveChildrenOrder) { - node = {}; - if (_this.options.attrkey in obj) { - node[_this.options.attrkey] = obj[_this.options.attrkey]; - delete obj[_this.options.attrkey]; - } - if (!_this.options.charsAsChildren && _this.options.charkey in obj) { - node[_this.options.charkey] = obj[_this.options.charkey]; - delete obj[_this.options.charkey]; - } - if (Object.getOwnPropertyNames(obj).length > 0) { - node[_this.options.childkey] = obj; - } - obj = node; - } else if (s) { - s[_this.options.childkey] = s[_this.options.childkey] || []; - objClone = {}; - for (key in obj) { - if (!hasProp.call(obj, key)) continue; - objClone[key] = obj[key]; - } - s[_this.options.childkey].push(objClone); - delete obj["#name"]; - if (Object.keys(obj).length === 1 && charkey in obj && !_this.EXPLICIT_CHARKEY) { - obj = obj[charkey]; - } - } - } - if (stack.length > 0) { - return _this.assignOrPush(s, nodeName, obj); - } else { - if (_this.options.explicitRoot) { - old = obj; - obj = {}; - obj[nodeName] = old; - } - _this.resultObject = obj; - _this.saxParser.ended = true; - return _this.emit("end", _this.resultObject); - } - }; - })(this); - ontext = (function(_this) { - return function(text) { - var charChild, s; - s = stack[stack.length - 1]; - if (s) { - s[charkey] += text; - if (_this.options.explicitChildren && _this.options.preserveChildrenOrder && _this.options.charsAsChildren && (_this.options.includeWhiteChars || text.replace(/\\n/g, '').trim() !== '')) { - s[_this.options.childkey] = s[_this.options.childkey] || []; - charChild = { - '#name': '__text__' - }; - charChild[charkey] = text; - if (_this.options.normalize) { - charChild[charkey] = charChild[charkey].replace(/\s{2,}/g, " ").trim(); - } - s[_this.options.childkey].push(charChild); - } - return s; - } - }; - })(this); - this.saxParser.ontext = ontext; - return this.saxParser.oncdata = (function(_this) { - return function(text) { - var s; - s = ontext(text); - if (s) { - return s.cdata = true; - } - }; - })(this); - }; - - Parser.prototype.parseString = function(str, cb) { - var err; - if ((cb != null) && typeof cb === "function") { - this.on("end", function(result) { - this.reset(); - return cb(null, result); - }); - this.on("error", function(err) { - this.reset(); - return cb(err); - }); - } - try { - str = str.toString(); - if (str.trim() === '') { - this.emit("end", null); - return true; - } - str = bom.stripBOM(str); - if (this.options.async) { - this.remaining = str; - setImmediate(this.processAsync); - return this.saxParser; - } - return this.saxParser.write(str).close(); - } catch (error1) { - err = error1; - if (!(this.saxParser.errThrown || this.saxParser.ended)) { - this.emit('error', err); - return this.saxParser.errThrown = true; - } else if (this.saxParser.ended) { - throw err; - } - } - }; - - return Parser; - - })(events.EventEmitter); - - exports.parseString = function(str, a, b) { - var cb, options, parser; - if (b != null) { - if (typeof b === 'function') { - cb = b; - } - if (typeof a === 'object') { - options = a; - } - } else { - if (typeof a === 'function') { - cb = a; - } - options = {}; - } - parser = new exports.Parser(options); - return parser.parseString(str, cb); - }; - -}).call(this); - - -/***/ }), - -/***/ 99236: -/***/ (function(__unused_webpack_module, exports) { - -// Generated by CoffeeScript 1.12.7 -(function() { - "use strict"; - var prefixMatch; - - prefixMatch = new RegExp(/(?!xmlns)^.*:/); - - exports.normalize = function(str) { - return str.toLowerCase(); - }; - - exports.firstCharLowerCase = function(str) { - return str.charAt(0).toLowerCase() + str.slice(1); - }; - - exports.stripPrefix = function(str) { - return str.replace(prefixMatch, ''); - }; - - exports.parseNumbers = function(str) { - if (!isNaN(str)) { - str = str % 1 === 0 ? parseInt(str, 10) : parseFloat(str); - } - return str; - }; - - exports.parseBooleans = function(str) { - if (/^(?:true|false)$/i.test(str)) { - str = str.toLowerCase() === 'true'; - } - return str; - }; - -}).call(this); - - -/***/ }), - -/***/ 66189: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -// Generated by CoffeeScript 1.12.7 -(function() { - "use strict"; - var builder, defaults, parser, processors, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - - defaults = __nccwpck_require__(97251); - - builder = __nccwpck_require__(43337); - - parser = __nccwpck_require__(83314); - - processors = __nccwpck_require__(99236); - - exports.defaults = defaults.defaults; - - exports.processors = processors; - - exports.ValidationError = (function(superClass) { - extend(ValidationError, superClass); - - function ValidationError(message) { - this.message = message; - } - - return ValidationError; - - })(Error); - - exports.Builder = builder.Builder; - - exports.Parser = parser.Parser; - - exports.parseString = parser.parseString; - -}).call(this); - - -/***/ }), - -/***/ 41695: +/***/ 6409: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -;(function (sax) { // wrapper for non-node envs - sax.parser = function (strict, opt) { return new SAXParser(strict, opt) } - sax.SAXParser = SAXParser - sax.SAXStream = SAXStream - sax.createStream = createStream +"use strict"; - // When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns. - // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)), - // since that's the earliest that a buffer overrun could occur. This way, checks are - // as rare as required, but as often as necessary to ensure never crossing this bound. - // Furthermore, buffers are only tested at most once per write(), so passing a very - // large string into write() might have undesirable effects, but this is manageable by - // the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme - // edge case, result in creating at most one complete copy of the string passed in. - // Set to Infinity to have unlimited buffers. - sax.MAX_BUFFER_LENGTH = 64 * 1024 - var buffers = [ - 'comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype', - 'procInstName', 'procInstBody', 'entity', 'attribName', - 'attribValue', 'cdata', 'script' - ] +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = void 0; - sax.EVENTS = [ - 'text', - 'processinginstruction', - 'sgmldeclaration', - 'doctype', - 'comment', - 'opentagstart', - 'attribute', - 'opentag', - 'closetag', - 'opencdata', - 'cdata', - 'closecdata', - 'error', - 'end', - 'ready', - 'script', - 'opennamespace', - 'closenamespace' - ] +var _v = _interopRequireDefault(__nccwpck_require__(5998)); - function SAXParser (strict, opt) { - if (!(this instanceof SAXParser)) { - return new SAXParser(strict, opt) - } +var _md = _interopRequireDefault(__nccwpck_require__(4569)); - var parser = this - clearBuffers(parser) - parser.q = parser.c = '' - parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH - parser.opt = opt || {} - parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags - parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase' - parser.tags = [] - parser.closed = parser.closedRoot = parser.sawRoot = false - parser.tag = parser.error = null - parser.strict = !!strict - parser.noscript = !!(strict || parser.opt.noscript) - parser.state = S.BEGIN - parser.strictEntities = parser.opt.strictEntities - parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES) - parser.attribList = [] +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - // namespaces form a prototype chain. - // it always points at the current tag, - // which protos to its parent tag. - if (parser.opt.xmlns) { - parser.ns = Object.create(rootNS) - } +const v3 = (0, _v.default)('v3', 0x30, _md.default); +var _default = v3; +exports.default = _default; - // mostly just for error reporting - parser.trackPosition = parser.opt.position !== false - if (parser.trackPosition) { - parser.position = parser.line = parser.column = 0 - } - emit(parser, 'onready') +/***/ }), + +/***/ 5998: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = _default; +exports.URL = exports.DNS = void 0; + +var _stringify = _interopRequireDefault(__nccwpck_require__(8950)); + +var _parse = _interopRequireDefault(__nccwpck_require__(2746)); + +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)); } - if (!Object.create) { - Object.create = function (o) { - function F () {} - F.prototype = o - var newf = new F() - return newf + return bytes; +} + +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +exports.DNS = DNS; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +exports.URL = URL; + +function _default(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === 'string') { + value = stringToBytes(value); } - } - if (!Object.keys) { - Object.keys = function (o) { - var a = [] - for (var i in o) if (o.hasOwnProperty(i)) a.push(i) - return a + if (typeof namespace === 'string') { + namespace = (0, _parse.default)(namespace); } - } - function checkBufferLength (parser) { - var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10) - var maxActual = 0 - for (var i = 0, l = buffers.length; i < l; i++) { - var len = parser[buffers[i]].length - if (len > maxAllowed) { - // Text/cdata nodes can get big, and since they're buffered, - // we can get here under normal conditions. - // Avoid issues by emitting the text node now, - // so at least it won't get any bigger. - switch (buffers[i]) { - case 'textNode': - closeText(parser) - break + if (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])` - case 'cdata': - emitNode(parser, 'oncdata', parser.cdata) - parser.cdata = '' - break - case 'script': - emitNode(parser, 'onscript', parser.script) - parser.script = '' - break + 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; - default: - error(parser, 'Max buffer length exceeded: ' + buffers[i]) - } + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; } - maxActual = Math.max(maxActual, len) - } - // schedule the next check for the earliest possible buffer overrun. - var m = sax.MAX_BUFFER_LENGTH - maxActual - parser.bufferCheckPosition = m + parser.position - } - function clearBuffers (parser) { - for (var i = 0, l = buffers.length; i < l; i++) { - parser[buffers[i]] = '' + return buf; } - } - function flushBuffers (parser) { - closeText(parser) - if (parser.cdata !== '') { - emitNode(parser, 'oncdata', parser.cdata) - parser.cdata = '' - } - if (parser.script !== '') { - emitNode(parser, 'onscript', parser.script) - parser.script = '' - } - } + return (0, _stringify.default)(bytes); + } // Function#name is not settable on some platforms (#270) - SAXParser.prototype = { - end: function () { end(this) }, - write: write, - resume: function () { this.error = null; return this }, - close: function () { return this.write(null) }, - flush: function () { flushBuffers(this) } - } - var Stream try { - Stream = __nccwpck_require__(92413).Stream - } catch (ex) { - Stream = function () {} + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} + +/***/ }), + +/***/ 5122: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = void 0; + +var _rng = _interopRequireDefault(__nccwpck_require__(807)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(8950)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function v4(options, buf, offset) { + 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; } - var streamWraps = sax.EVENTS.filter(function (ev) { - return ev !== 'error' && ev !== 'end' - }) + return (0, _stringify.default)(rnds); +} - function createStream (strict, opt) { - return new SAXStream(strict, opt) +var _default = v4; +exports.default = _default; + +/***/ }), + +/***/ 9120: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = void 0; + +var _v = _interopRequireDefault(__nccwpck_require__(5998)); + +var _sha = _interopRequireDefault(__nccwpck_require__(5274)); + +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; + +/***/ }), + +/***/ 6900: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = void 0; + +var _regex = _interopRequireDefault(__nccwpck_require__(814)); + +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; + +/***/ }), + +/***/ 2414: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.default = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(6900)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function version(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); } - function SAXStream (strict, opt) { - if (!(this instanceof SAXStream)) { - return new SAXStream(strict, opt) - } + return parseInt(uuid.substr(14, 1), 16); +} - Stream.apply(this) - - this._parser = new SAXParser(strict, opt) - this.writable = true - this.readable = true - - var me = this - - this._parser.onend = function () { - me.emit('end') - } - - this._parser.onerror = function (er) { - me.emit('error', er) - - // if didn't throw, then means error was handled. - // go ahead and clear error, so we can write again. - me._parser.error = null - } - - this._decoder = null - - streamWraps.forEach(function (ev) { - Object.defineProperty(me, 'on' + ev, { - get: function () { - return me._parser['on' + ev] - }, - set: function (h) { - if (!h) { - me.removeAllListeners(ev) - me._parser['on' + ev] = h - return h - } - me.on(ev, h) - }, - enumerable: true, - configurable: false - }) - }) - } - - SAXStream.prototype = Object.create(Stream.prototype, { - constructor: { - value: SAXStream - } - }) - - SAXStream.prototype.write = function (data) { - if (typeof Buffer === 'function' && - typeof Buffer.isBuffer === 'function' && - Buffer.isBuffer(data)) { - if (!this._decoder) { - var SD = __nccwpck_require__(24304).StringDecoder - this._decoder = new SD('utf8') - } - data = this._decoder.write(data) - } - - this._parser.write(data.toString()) - this.emit('data', data) - return true - } - - SAXStream.prototype.end = function (chunk) { - if (chunk && chunk.length) { - this.write(chunk) - } - this._parser.end() - return true - } - - SAXStream.prototype.on = function (ev, handler) { - var me = this - if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) { - me._parser['on' + ev] = function () { - var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments) - args.splice(0, 0, ev) - me.emit.apply(me, args) - } - } - - return Stream.prototype.on.call(me, ev, handler) - } - - // this really needs to be replaced with character classes. - // XML allows all manner of ridiculous numbers and digits. - var CDATA = '[CDATA[' - var DOCTYPE = 'DOCTYPE' - var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace' - var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/' - var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE } - - // http://www.w3.org/TR/REC-xml/#NT-NameStartChar - // This implementation works on strings, a single character at a time - // as such, it cannot ever support astral-plane characters (10000-EFFFF) - // without a significant breaking change to either this parser, or the - // JavaScript language. Implementation of an emoji-capable xml parser - // is left as an exercise for the reader. - var nameStart = /[:_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]/ - - var nameBody = /[:_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\u00B7\u0300-\u036F\u203F-\u2040.\d-]/ - - var entityStart = /[#:_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]/ - var entityBody = /[#:_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\u00B7\u0300-\u036F\u203F-\u2040.\d-]/ - - function isWhitespace (c) { - return c === ' ' || c === '\n' || c === '\r' || c === '\t' - } - - function isQuote (c) { - return c === '"' || c === '\'' - } - - function isAttribEnd (c) { - return c === '>' || isWhitespace(c) - } - - function isMatch (regex, c) { - return regex.test(c) - } - - function notMatch (regex, c) { - return !isMatch(regex, c) - } - - var S = 0 - sax.STATE = { - BEGIN: S++, // leading byte order mark or whitespace - BEGIN_WHITESPACE: S++, // leading whitespace - TEXT: S++, // general stuff - TEXT_ENTITY: S++, // & and such. - OPEN_WAKA: S++, // < - SGML_DECL: S++, // - SCRIPT: S++, //